-
-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate testing pipeline to GitHub Actions (#1985)
* Migrate testing pipeline to GitHub Actions * Change branch target on push trigger * Remove if condition in Codecov step * Remove depth parameter in checkout step * Remove blank line * Try splitting lines in YAML file * Remove manual trigger * Try splitting lines in YAML file (again) * Change Azure badge for GA; Fix Open in VSCode badge; Rearrange badges * Try splitting lines in YAML file (again) * Remove blank line
- Loading branch information
Showing
3 changed files
with
87 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,64 @@ | ||
# For more information about TARDIS pipelines, please refer to: | ||
# | ||
# https://tardis-sn.github.io/tardis/development/continuous_integration.html | ||
|
||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
concurrency: | ||
group: tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata | ||
--cov=tardis --cov-report=xml --cov-report=html | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Clone tardis-sn/tardis-refdata | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: tardis-sn/tardis-refdata | ||
path: tardis-refdata | ||
lfs: true | ||
|
||
- name: Setup environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
environment-file: tardis_env3.yml | ||
activate-environment: tardis | ||
use-mamba: true | ||
|
||
- name: Install package | ||
run: pip install -e . | ||
|
||
- name: Run tests | ||
run: pytest tardis ${{ env.PYTEST_FLAGS }} | ||
|
||
- name: Upload to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) |
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