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

run pytest in GitHub workflow jobs #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build

on:
release:
types: [ released ]
pull_request:
workflow_dispatch:

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: test

on:
workflow_dispatch:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install ruff
- run: ruff check .
test:
name: test (Python ${{ matrix.python-version }}, ${{ matrix.runs-on }})
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on: [ "ubuntu-latest", "macos-latest" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install -e .[test] pytest-xdist
- run: pip list
- run: pytest -n auto .
60 changes: 0 additions & 60 deletions azure-pipelines.yml

This file was deleted.

73 changes: 0 additions & 73 deletions azure-templates.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sphinx
import stsci_rtd_theme
from packaging.version import Version
import wiimatch
try:
from ConfigParser import ConfigParser
except ImportError:
Expand Down Expand Up @@ -113,7 +114,6 @@ def check_sphinx_version(expected_version):
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# build documents.
import wiimatch
release = f"{wiimatch.__version__:s}"
version = release

Expand Down
Loading