-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 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,25 @@ | ||
# Workflow file for slow tests & on multiple python versions | ||
name: Integration tests | ||
on: | ||
pull_request_review: | ||
types: [approved] | ||
workflow_dispatch: # <-- can be triggered manually! | ||
|
||
jobs: | ||
integration-tests: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13] | ||
python-version: [3.10, 3.11, 3.12] | ||
steps: | ||
- name: Set up Python version ${{ matrix.version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
- name: Install package and requirements | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
pip install . | ||
- name: Run pytest | ||
run: pytest -s tests/ --cov=rascal2 --cov-report=term |
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,36 @@ | ||
# Workflow file for fast unit tests which run on all commits | ||
name: Unit tests | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
args: 'format --check' | ||
|
||
unit-tests: | ||
name: Unit tests | ||
needs: ruff # avoid wasting CI time if static analysis failed | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Conda environment from environment.yaml | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
environment-file: environment.yaml | ||
auto-activate-base: false | ||
- name: Install RasCAL2 | ||
run: pip install . | ||
- name: Run pytest | ||
run: pytest -s tests/ -m "not slow" --cov=rascal2 --cov-report=term |
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,3 @@ | ||
[pytest] | ||
markers = | ||
slow: marks slow tests which only run on review |