Add packaging workflows #1
Workflow file for this run
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
--- | |
name: Test repository Actions | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Cancel running jobs for the same workflow and branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
# IMPORTANT: Any new jobs need to be added to the check-tests-passed job to ensure they correctly gate code changes | |
jobs: | |
test-create-unique-testpypi-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./actions/create-unique-testpypi-version | |
id: create-version | |
with: | |
package-name: example-package # this is an example package that is never updated | |
- name: Verify the new version number | |
run: | | |
if [ "${{ steps.create-version.outputs.new-version }}" != "0.0.1.post1" ]; then | |
echo "The new version number doesn't match the expected version number." | |
echo "Expected: 0.0.1.post1" | |
echo "Actual: ${{ steps.create-version.outputs.new-version }}" | |
exit 1 | |
fi | |
test-find-unreleased-changelog-items: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./actions/find-unreleased-changelog-items | |
with: | |
release-level: patch | |
previous-changelog-filename: .testing_previous_changelog_for_template.md | |
previous-release-notes-filename: .testing_previous_release_notes_for_template.md | |
- name: Verify .testing_previous_changelog_for_template.md exists | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: ./python_semantic_release_templates/.testing_previous_changelog_for_template.md | |
ignore_case: false | |
follow_symbolic_links: false | |
fail: true | |
- name: Verify .testing_previous_release_notes_for_template.md exists | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: ./python_semantic_release_templates/.testing_previous_release_notes_for_template.md | |
ignore_case: false | |
follow_symbolic_links: false | |
fail: true | |
- name: Verify that the GITHUB_STEP_SUMMARY is not empty | |
run: | | |
if [ -s "$GITHUB_STEP_SUMMARY" ]; then | |
echo "GITHUB_STEP_SUMMARY is not empty." | |
else | |
echo "GITHUB_STEP_SUMMARY is empty." | |
exit 1 | |
fi | |
test-update-development-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./actions/update-development-dependencies | |
with: | |
update-pre-commit: true | |
run-pre-commit: true | |
pre-commit-hook-skip-list: pyright,poetry-audit | |
export-dependency-groups: udd:actions/update-development-dependencies,cutv:actions/create-unique-testpypi-version,fci:actions/find-unreleased-changelog-items | |
# Check that all jobs passed | |
check-tests-passed: | |
if: ${{ !cancelled() }} | |
needs: | |
- test-update-development-dependencies | |
- test-create-unique-testpypi-version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |