From 3c1c213b65ac8b5b0af5012fd400dca74a431185 Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 15:34:55 -0400 Subject: [PATCH 1/6] Add tests for python3.9 and 3.9 --- .github/workflows/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc137f24..e6710dd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,15 @@ 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.7.1 + - python-version: 3.9 + torch-version: 1.8.1 steps: - uses: actions/checkout@v2 @@ -50,7 +59,7 @@ 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" && ${{ matrix.python-version }} != "3.9" ]]; 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 - name: Test with pytest and run coverage run: | From 95dc32aa66b5b217b969dac16636964b217f75b7 Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 15:39:21 -0400 Subject: [PATCH 2/6] Suppress mypy tests for python3.8 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6710dd7..a41cebaf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ 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" && ${{ matrix.python-version }} != "3.9" ]]; then mypy .; 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" ]]; then _rc=0; for dir in `echo examples/**/`; do mypy $dir || _rc=$?; done && [[ $_rc == 0 ]]; fi - name: Test with pytest and run coverage run: | From 1179d2548c5aa4bda4ab48dc94d033808d55e205 Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 15:45:56 -0400 Subject: [PATCH 3/6] Suppress mypy tests for pytorch1.7 1.8 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a41cebaf..c1fb5cd6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,7 +60,7 @@ jobs: - name: Linting with mypy if torch versoin is not 1.0.1 run: | 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" ]]; 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 _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 From 0c9643656dfd3a9c2a41dce70da507d5fcaa1d5d Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 16:11:10 -0400 Subject: [PATCH 4/6] Remove python3.9,pytorch1.7 from workflow matrix --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1fb5cd6..90c8a9a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,8 +25,6 @@ jobs: torch-version: 1.7.1 - python-version: 3.8 torch-version: 1.8.1 - - python-version: 3.9 - torch-version: 1.7.1 - python-version: 3.9 torch-version: 1.8.1 From 66b861493a5deccb966fb97ddc33b1faf91318eb Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 17:58:01 -0400 Subject: [PATCH 5/6] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90c8a9a8..6fac5a4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,6 @@ jobs: torch-version: 1.8.1 - python-version: 3.9 torch-version: 1.8.1 - steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 09a387846fd494c0fde384fcf473eed6339df50a Mon Sep 17 00:00:00 2001 From: Suqi Sun Date: Tue, 6 Jul 2021 17:58:20 -0400 Subject: [PATCH 6/6] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6fac5a4c..90c8a9a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,7 @@ jobs: torch-version: 1.8.1 - python-version: 3.9 torch-version: 1.8.1 + steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }}