Skip to content

Commit

Permalink
Merge pull request #37 from astrofrog/actions
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog authored Mar 16, 2022
2 parents cd990d7 + 4cfc229 commit e3655b9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 44 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
pull_request:

jobs:
tests:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: --openmp-expected=True
coverage: codecov
envs: |
# Code style
- linux: style
# Docs
- linux: build_docs
# Standard tests
- linux: py36-test-oldestdeps
- linux: py37-test
- linux: py38-test
- linux: py38-test-dev
- macos: py38-test-dev
posargs: --openmp-expected=False
- windows: py36-test
runs-on: windows-2019
- windows: py38-test-dev
runs-on: windows-2019
# Test with more compilers, for the OpenMP helpers
- macos: py38-test-osxclang-conda
- linux: py38-test-linuxgcc-conda
# Test downstream packages
- linux: py39-downstream
publish:
needs: tests
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
test_extras: test
test_command: pytest --pyargs extension_helpers
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}
40 changes: 0 additions & 40 deletions azure-pipelines.yml

This file was deleted.

10 changes: 7 additions & 3 deletions extension_helpers/tests/test_openmp_helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import os
import sys
import types
Expand All @@ -12,9 +13,12 @@

@pytest.fixture
def openmp_expected(request):
openmp_expected = request.config.getoption("--openmp-expected")
if openmp_expected is not None:
return openmp_expected.lower() == 'true'
try:
openmp_expected = request.config.getoption("--openmp-expected")
if openmp_expected is not None:
return openmp_expected.lower() == 'true'
except ValueError:
return None


def test_add_openmp_flags_if_available(openmp_expected):
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ setuptools.finalize_distribution_options =

[options.extras_require]
test =
wheel
pytest
pytest-cov
coverage>=4
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ commands =
[testenv:py39-downstream]
changedir = test: .tmp/downstream
commands =
pip install setuptools setuptools_scm wheel cython==0.29.22 jinja2==2.10.3 numpy
pip install setuptools setuptools_scm wheel cython numpy
pip install --no-build-isolation "git+https://github.com/astropy/astropy#egg=astropy[test]"
pytest --pyargs astropy
pip install --no-build-isolation "git+https://github.com/sunpy/sunpy#egg=sunpy[all,tests]"
Expand Down

0 comments on commit e3655b9

Please sign in to comment.