forked from astropy/reproject
-
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 astropy#266 from pllim/last-actions-hero
TST: Move CI from Azure to Actions
- Loading branch information
Showing
3 changed files
with
75 additions
and
37 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,72 @@ | ||
name: Run unit tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
workflow_dispatch: | ||
schedule: | ||
# Run every Monday at 05:53 UTC | ||
- cron: 53 5 * * 1 | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
testenv: [{python: 3.7, toxenv: py37-test-oldestdeps-cov}, {python: 3.8, toxenv: py38-test-cov}, {python: 3.9, toxenv: py39-test-cov}] | ||
include: | ||
- os: ubuntu-latest | ||
testenv: [{python: 3.9, toxenv: codestyle}] | ||
- os: ubuntu-latest | ||
testenv: [{python: 3.8, build_docs}] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.testenv.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.testenv.python }} | ||
- name: Install dependencies on Linux | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install geos-devel | ||
sudo apt-get install freetype-devel | ||
sudo apt-get install libpng-devel | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Install codecov | ||
if: ${{ contains(matrix.testenv.toxenv,'-cov') }} | ||
run: python -m pip install codecov | ||
- name: Run tox | ||
run: tox -v -e ${{ matrix.testenv.toxenv }} | ||
- name: Upload coverage to codecov | ||
if: ${{ contains(matrix.testenv.toxenv,'-cov') }} | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
file: ./coverage.xml | ||
|
||
linux32: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/pypa/manylinux2014_i686 | ||
steps: | ||
# TODO: Use newer checkout actions when https://github.com/actions/checkout/issues/334 fixed | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies for Python 3.7 | ||
run: /opt/python/cp37-cp37/bin/pip install tox | ||
- name: Run tests for Python 3.7 | ||
run: /opt/python/cp37-cp37/bin/python -m tox -e py37-test-oldestdeps-cov | ||
- name: Install dependencies for Python 3.8 | ||
run: /opt/python/cp38-cp38/bin/pip install tox | ||
- name: Run tests for Python 3.8 | ||
run: /opt/python/cp38-cp38/bin/python -m tox -e py38-test-cov |
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
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