Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions. #488

Merged
merged 1 commit into from
Jun 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
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