Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Github action to run pytests #1167

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/pytests.yaml
Original file line number Diff line number Diff line change
@@ -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