-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github workflow: run tests when submitting PR
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Basic Tests | ||
|
||
on: | ||
pull_request: | ||
branches: main | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
|
||
run_tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest"] | ||
python-version: ["3.10"] | ||
|
||
|
||
steps: | ||
|
||
# Set-up dependencies | ||
- name: Check-out repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Needed for tags to be fetched; see https://github.com/actions/checkout/issues/290 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
shell: bash -l {0} | ||
run: | | ||
python -m pip install poetry==1.6.1 | ||
# Install the project (we need some of the tools installed here for liniting etc) | ||
- name: Install the project | ||
shell: bash -l {0} | ||
run: poetry install --no-interaction --all-extras | ||
|
||
- name: Run tests | ||
shell: bash -l {0} | ||
run: pytest |