-
-
Notifications
You must be signed in to change notification settings - Fork 131
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 #488 from hameerabbasi/gh-actions
Add GitHub actions.
- Loading branch information
Showing
1 changed file
with
49 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,49 @@ | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
platform: | ||
- os: ubuntu-latest | ||
miniconda-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh | ||
- os: macos-latest | ||
miniconda-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh | ||
- os: windows-latest | ||
miniconda-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe | ||
python: [3.7, 3.8, 3.9] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python }} | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
installer-url: ${{ matrix.miniconda-url }} | ||
activate-environment: sparse-dev | ||
allow-softlinks: true | ||
- name: Install package | ||
run: | | ||
conda create -n sparse-dev python=$PYTHON_VERSION | ||
pip install -e .[tests] | ||
pip install codecov | ||
- name: Run tests | ||
run: | | ||
pytest --pyargs sparse | ||
- uses: codecov/codecov-action@v1 | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
- vnext | ||
pull_request: | ||
branches: | ||
- main | ||
- vnext | ||
# Also trigger on page_build, as well as release created events | ||
page_build: | ||
release: | ||
types: # This configuration does not affect the page_build event above | ||
- created |