-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (26 loc) · 1.04 KB
/
build_lint_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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