-
Notifications
You must be signed in to change notification settings - Fork 10
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 #112 from pllim/actions-packed-2
TST: Move CI from Azure to Actions
- Loading branch information
Showing
9 changed files
with
199 additions
and
204 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,188 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# Weekly Tuesday 6AM build | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 6 * * 2' | ||
|
||
env: | ||
PYSYN_CDBS: "http://ssb.stsci.edu/cdbs/" | ||
|
||
jobs: | ||
pep_and_audit: | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Lint with flake8 | ||
run: | | ||
python -m pip install --upgrade pip flake8 | ||
flake8 stsynphot --count | ||
# Make sure that packaging will work | ||
- name: pep517 build | ||
run: | | ||
python -m pip install --upgrade setuptools pep517 twine | ||
python -m pep517.build --source . | ||
twine check dist/* | ||
- name: Security audit | ||
run: | | ||
python -m pip install --upgrade bandit | ||
bandit -r . -c .bandit.yaml | ||
initial_tests: | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install and build | ||
run: | | ||
sudo apt-get install libxml2-utils | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install -e .[test] | ||
- name: Test without optional deps | ||
run: pytest --open-files | ||
|
||
coverage_tests: | ||
runs-on: ubuntu-latest | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install and build | ||
run: | | ||
sudo apt-get install libxml2-utils | ||
python -m pip install --upgrade pip setuptools pytest-cov codecov | ||
python -m pip install -e .[test,all] | ||
# NOTE: If CDBS cannot take the hit, disable --remote-data | ||
- name: Test with coverage | ||
run: pytest --cov=./ --cov-report=xml --open-files --remote-data | ||
- name: Coverage report | ||
uses: codecov/codecov-action@f532c3a # v1.0.7 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
dev_deps_tests: | ||
runs-on: ubuntu-latest | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install and build | ||
run: | | ||
sudo apt-get install libxml2-utils | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install git+https://github.com/astropy/astropy.git@master#egg=astropy | ||
python -m pip install git+https://github.com/spacetelescope/synphot_refactor.git@master#egg=synphot | ||
python -m pip install -e .[test] | ||
- name: Test with dev deps | ||
run: pytest --open-files | ||
|
||
old_deps_tests: | ||
runs-on: ubuntu-16.04 | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
- name: Install and build | ||
run: | | ||
sudo apt-get install libxml2-utils | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install numpy==1.16.6 | ||
python -m pip install scipy==1.1.0 | ||
python -m pip install astropy==3.2.2 | ||
python -m pip install synphot==0.2.1 | ||
python -m pip install -e .[test] | ||
- name: Test with old deps | ||
run: pytest --open-files | ||
|
||
windows: | ||
runs-on: windows-latest | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install and build | ||
run: | | ||
python -m pip install --upgrade pip setuptools scipy | ||
python -m pip install -e .[test] | ||
# NOTE: If CDBS cannot take the hit, disable --remote-data | ||
- name: Run tests | ||
run: pytest --open-files --remote-data | ||
|
||
osx: | ||
runs-on: macos-latest | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install and build | ||
run: | | ||
python -m pip install --upgrade pip setuptools scipy | ||
python -m pip install -e .[test] | ||
- name: Run tests | ||
run: pytest --open-files | ||
|
||
link_check: | ||
runs-on: ubuntu-latest | ||
needs: [pep_and_audit, initial_tests] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install and build | ||
run: | | ||
python -m pip install --upgrade pip setuptools sphinx-astropy | ||
python -m pip install -e . | ||
- name: Docs link check | ||
run: | | ||
cd docs | ||
make linkcheck | ||
shell: 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.