diff --git a/.github/workflows/pytests.yaml b/.github/workflows/pytests.yaml new file mode 100644 index 0000000000..0c3c0ccb59 --- /dev/null +++ b/.github/workflows/pytests.yaml @@ -0,0 +1,35 @@ +name: Run pytests +on: [push, pull_request] + +jobs: + run_pytests: + runs-on: ubuntu-latest + name: Install pygw and run tests with pytests + strategy: + matrix: + python: ["3.7", "3.8", "3.9", "3.10"] + + steps: + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python }} + + - name: Install (upgrade) dependencies + run: | + pip install --upgrade pip + + - name: Checkout + uses: actions/checkout@v2 + with: + path: global-workflow + + - name: Install pygw + run: | + cd $GITHUB_WORKSPACE/global-workflow/ush/python/pygw + pip install .[dev] + + - name: Run pytests + run: | + cd $GITHUB_WORKSPACE/global-workflow/ush/python/pygw + pytest -v src/tests