-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#296 - refactor to reusable workflows
- Loading branch information
Showing
5 changed files
with
69 additions
and
34 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,22 @@ | ||
name: build-package | ||
on: | ||
workflow_call: | ||
jobs: | ||
build: | ||
name: Build wheel and sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install build dependencies | ||
run: pip install --no-cache-dir -U pip .['build'] | ||
- name: Build package | ||
run: ./scripts/cd.py --build | ||
- name: Upload built distributions | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist |
7 changes: 3 additions & 4 deletions
7
.github/workflows/integration-tests.yml → .github/workflows/_integration-tests.yml
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
4 changes: 2 additions & 2 deletions
4
.github/workflows/static-checks.yml → .github/workflows/_static-checks.yml
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
48 changes: 20 additions & 28 deletions
48
.github/workflows/build-upload.yml → .github/workflows/_upload-package.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: cicd | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
pull_request: | ||
|
||
jobs: | ||
static-checks: | ||
uses: ./.github/workflows/_static-checks.yml | ||
integration-tests: | ||
uses: ./.github/workflows/_integration-tests.yml | ||
secrets: | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
build-package: | ||
uses: ./.github/workflows/_build-package.yml | ||
upload-package: | ||
uses: ./.github/workflows/_upload-package.yml | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [static-checks, integration-tests, build-package] | ||
secrets: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |