diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc137f24..90c8a9a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,13 @@ jobs: torch-version: 1.3.0 - python-version: 3.6 torch-version: 1.4.0 + include: + - python-version: 3.8 + torch-version: 1.7.1 + - python-version: 3.8 + torch-version: 1.8.1 + - python-version: 3.9 + torch-version: 1.8.1 steps: - uses: actions/checkout@v2 @@ -50,8 +57,8 @@ jobs: if [[ ${{ matrix.torch-version }} == "1.4.0" ]]; then flake8 texar/ examples/; fi - name: Linting with mypy if torch versoin is not 1.0.1 run: | - if [[ ${{ matrix.torch-version }} != "1.0.1" ]]; then mypy .; fi - if [[ ${{ matrix.torch-version }} != "1.0.1" ]]; then _rc=0; for dir in `echo examples/**/`; do mypy $dir || _rc=$?; done && [[ $_rc == 0 ]]; fi + if [[ ${{ matrix.torch-version }} != "1.0.1" && ${{ matrix.torch-version }} != "1.7.1" && ${{ matrix.torch-version }} != "1.8.1" ]]; then mypy .; fi + if [[ ${{ matrix.torch-version }} != "1.0.1" && ${{ matrix.torch-version }} != "1.7.1" && ${{ matrix.torch-version }} != "1.8.1" ]]; then _rc=0; for dir in `echo examples/**/`; do mypy $dir || _rc=$?; done && [[ $_rc == 0 ]]; fi - name: Test with pytest and run coverage run: | coverage run -m pytest