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#283 from astropy/actions
Use OpenAstronomy GitHub actions workflows
- Loading branch information
Showing
7 changed files
with
33 additions
and
109 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 |
---|---|---|
@@ -1,78 +1,32 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
workflow_dispatch: | ||
schedule: | ||
# Run every Monday at 05:53 UTC | ||
- cron: 53 5 * * 1 | ||
pull_request: | ||
|
||
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, toxenv: build_docs} | ||
- os: ubuntu-latest | ||
testenv: {python: '3.10', toxenv: py310-test-devdeps-cov} | ||
|
||
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 -y install libgeos-dev libfreetype-dev libpng-dev | ||
- 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 | ||
tests: | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
envs: | | ||
- linux: codestyle | ||
- macos: py37-test-oldestdeps-cov | ||
- macos: py38-test-cov | ||
- macos: py39-test-cov | ||
- linux: py37-test-oldestdeps-cov | ||
- linux: py38-test-cov | ||
- linux: py39-test-cov | ||
- windows: py37-test-oldestdeps-cov | ||
- windows: py38-test-cov | ||
- windows: py39-test-cov | ||
coverage: 'codecov' | ||
|
||
linux32: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/pypa/manylinux_2_24_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: | | ||
apt-get update | ||
apt-get -y install libgeos-dev libfreetype6-dev libpng-dev | ||
/opt/python/cp37-cp37m/bin/pip install tox | ||
- name: Run tests for Python 3.7 | ||
run: /opt/python/cp37-cp37m/bin/python -m tox -e py37-test-oldestdeps-cov | ||
- name: Install dependencies for Python 3.8 | ||
run: | | ||
apt-get update | ||
apt-get -y install libgeos-dev libfreetype6-dev libpng-dev | ||
/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-numpy121-cov | ||
publish: | ||
needs: tests | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 | ||
with: | ||
test_extras: test | ||
test_command: pytest -p no:warnings --pyargs reproject | ||
secrets: | ||
pypi_token: ${{ secrets.pypi_token }} |
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
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
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