Pr issue75 - readNetCDF_thermo() #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Samurai CPU test with Beltrami | |
on: | |
workflow_dispatch: | |
branches: [ "main" ] | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
docker-build-and-test: | |
name: Build and Test - ${{ matrix.dockerfile }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
dockerfile: | |
- Dockerfile | |
- Dockerfile.coverage | |
steps: | |
- name: Checkout code from a pull request or push | |
uses: actions/checkout@v3 | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Build Docker image | |
run: docker build -f docker/${{ matrix.dockerfile }} -t samurai . | |
- name: Running the Docker image for Beltrami case | |
# only run this if we are not running codecoverage tests | |
if: matrix.dockerfile != 'Dockerfile.coverage' | |
run: docker run --name test-container -t samurai | |
- name: Run coverage tests in container | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
run: docker run --name test-container -t samurai make coverage | |
- name: Copy coverage from container | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
run: docker cp test-container:/app/samurai/build/coverage.info . | |
- name: Upload coverage reports to Codecov | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.info | |
token: ${{ secrets.CODECOV_TOKEN }} |