-
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.
Merge pull request #7 from instituteofcancerresearch/osx-actions
Mac OS actions
- Loading branch information
Showing
2 changed files
with
68 additions
and
4 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,62 @@ | ||
name: SOPRANO (Dev) Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- python-dev | ||
pull_request: | ||
branches: | ||
- python-dev | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.11"] | ||
name: lint with python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install ruff and black | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff black | ||
- name: Lint check with ruff | ||
run: | | ||
ruff --format=github --target-version=py311 --line-length 79 . | ||
- name: Style check with black | ||
run: | | ||
black ./ --check --line-length 79 | ||
test: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.11"] | ||
name: test with python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: src/SOPRANO/local.yml | ||
init-shell: bash | ||
- name: Install SOPRANO | ||
shell: bash -l {0} | ||
run: | | ||
micromamba activate soprano-dev | ||
pip install -e .[ci] | ||
- name: Test conda environment | ||
shell: bash -l {0} | ||
run: | | ||
micromamba activate soprano-dev | ||
pytest tests/test_configuration | ||
- name: Test units | ||
shell: bash -l {0} | ||
run: | | ||
micromamba activate soprano-dev | ||
pytest tests/test_units |
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