Update build_and_deploy_documentation.yml #142
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: Build, lint, and run tests | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dockerfile: [pytorch1.13.1, pytorch2.1.2, pytorch2.2.2, pytorchlatest] | |
max-parallel: 4 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Docker Image | |
run: docker build -f ./docker/Dockerfile-${{ matrix.dockerfile }} -t flowc-${{ matrix.dockerfile }} . | |
- name: Lint with flake8 | |
run: | | |
docker run flowc-${{ matrix.dockerfile }} flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
docker run flowc-${{ matrix.dockerfile }} flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
run: docker run flowc-${{ matrix.dockerfile }} pytest /flowc --cov --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella |