Skip to content

feat: move to using local reusable workflow libbuild.yml #13

feat: move to using local reusable workflow libbuild.yml

feat: move to using local reusable workflow libbuild.yml #13

Workflow file for this run

name: Test & release
on:
pull_request:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
jobs:
pre-commit:
name: Run `pre-commit`
runs-on: ubuntu-latest
env:
# renovate: datasource=github-releases depName=actions/python-versions extractVersion=^(?<version>\S+)-\d+$
PYTHON_VERSION: 3.12.3
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
test:
name: Run approval tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # `copier` prefers full-history clones
submodules: true
- name: Debug on runner (When re-run with "Enable debug logging" checked)
if: runner.debug
uses: mxschmitt/action-tmate@b3db6e16e597d92037c8647e54acc5d2b1b48dee # v3.18
with:
detached: true
- name: Install test dependencies
run: |
pipx install copier
pipx install texttest
- name: Run `texttest`
run: texttest -b
results:
name: Collect results
needs:
- pre-commit
- test
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: codfish/semantic-release-action@b0e57c976bf8f74b2454f59a30e4a1b5f11727b4 # v3.3.0
with:
plugins: |
[ "@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}