Skip to content

Commit

Permalink
use PyPI upload workflow from OpenAstronomy (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: William Jamieson <[email protected]>
  • Loading branch information
zacharyburnett and WilliamJamieson authored Oct 2, 2023
1 parent f7f3b32 commit 7d3d12c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 52 deletions.
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 }}
12 changes: 3 additions & 9 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
name: Changelog
name: confirm changelog entry

on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]

# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
# within that PR re-triggers this CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changelog:
name: Confirm changelog entry
check:
runs-on: ubuntu-latest
steps:
- name: Check change log entry
uses: scientific-python/action-check-changelogfile@6087eddce1d684b0132be651a4dad97699513113 # 0.2
- uses: scientific-python/[email protected]
env:
CHANGELOG_FILENAME: CHANGES.rst
CHECK_MILESTONE: false
Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,17 @@ concurrency:
cancel-in-progress: true

jobs:
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: check-style
- linux: build-dist
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: test-oldestdeps-cov-xdist
python-version: 3.9
- linux: test-xdist
python-version: '3.9'
- linux: test-xdist
python-version: '3.10'
- linux: test-xdist
python-version: '3.11'
- macos: test-xdist
python-version: '3.11'
- linux: test-cov-xdist
- linux: py39-oldestdeps-cov-xdist
- linux: py310-xdist
- macos: py311-xdist
- linux: py311-cov-xdist
coverage: 'codecov'
test_downstream:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
setenv: |
CRDS_PATH: ${{ needs.crds.outputs.path }}
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: Weekly cron
name: Weekly CI

on:
schedule:
Expand All @@ -9,10 +8,14 @@ on:
# We also want this workflow triggered if the `Weekly CI` label is
# added or present when PR is updated
types:
- synchronize
- opened
- reopened
- labeled
- unlabeled
- synchronize
push:
tags: "*"
tags:
- "*"
workflow_dispatch:

jobs:
Expand All @@ -21,8 +24,8 @@ jobs:
if: (github.repository == 'spacetelescope/stpipe' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI')))
with:
envs: |
- macos: test-xdist
python-version: 3.9
- macos: test-xdist
python-version: 3.10
- linux: test-devdeps-xdist
- macos: py39-xdist
- macos: py310-xdist
- windows: py311-xdist
- linux: py3-devdeps-xdist
- macos: py3-devdeps-xdist
16 changes: 0 additions & 16 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

0 comments on commit 7d3d12c

Please sign in to comment.