Skip to content

Fix brittle test

Fix brittle test #8

Workflow file for this run

name: Tag
on:
push:
branches:
- main
permissions:
contents: "write"
id-token: "write"
jobs:
test:
name: Test and tag
runs-on:
group: "Cabana-CICD"
steps:
- uses: actions/checkout@v4
with:
submodules: true # Optional, use if you have submodules
- uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Test with tox
run: |
poetry install --no-interaction
poetry run tox
- name: The new tag
id: computed-tag
run: |
set -e
TAG=$(cat pyproject.toml \
| grep --extended-regexp "^version =" \
| grep --extended-regexp --only-matching "[0-9]+\.[0-9]+.[0-9]+[-\.\+a-zA-Z0-9]*" \
| head --lines=1)
echo "tag=v$TAG" >> "$GITHUB_OUTPUT"
- name: Tag main depending on the value in pyproject.toml
uses: djordon/[email protected]
with:
tag: ${{ steps.computed-tag.outputs.tag }}