From e045d4dd9a4644b9bee8b58e9404ec801a494b62 Mon Sep 17 00:00:00 2001 From: Thien Tran Date: Fri, 7 Jul 2023 15:37:52 +0800 Subject: [PATCH] add GHA --- .github/workflows/test.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..13a3f9e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,32 @@ +name: Test +on: + push: + paths-ignore: + - README.md + - .gitignore + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + pytorch-version: ["1.13", "2.0"] + python-version: ["3.10"] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install torch=${{ matrix.pytorch-version }} torchvision --extra-index-url https://download.pytorch.org/whl/cpu + pip install pytest + + - name: Run tests + run: python -m pytest -v