notes #36
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 desertislandutils | |
env: | |
ACTIONS_STEP_DEBUG: true | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
# NOTE: workflow_dispatch only work on main | |
workflow_dispatch: | |
inputs: | |
note: | |
description: 'Describe why you are doing this' | |
required: false | |
default: 'no message' | |
manual_workflow_conclusion: | |
description: 'Insert success/failure for downstream' | |
required: false | |
default: '' | |
type: choice | |
options: | |
- ' ' | |
- failure | |
- success | |
jobs: | |
poetry-run-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
run: | | |
python --version | |
pipx install --python $(which python) poetry | |
poetry --version | |
poetry install | |
poetry show --latest | |
- name: Poetry Run Pytest | |
run: | | |
poetry run pytest --disable-warnings --verbose | |
echo "WARNING: Pytest Warnings are disabled" | |
- name: Get Latest Tag | |
id: get_tag | |
run: | | |
latest_tag="$(git ls-remote origin 'refs/tags/v*[0-9]' | awk -F'refs/tags/' '{print $2}' | sort -V | tail -1)" | |
echo latest_tag="${latest_tag}" >> $GITHUB_OUTPUT | |
- name: Get desertislandutils Version | |
id: app_version | |
run: | | |
poetry_app_version="$(poetry version --short)" | |
echo poetry_app_version="v${poetry_app_version}" >> $GITHUB_OUTPUT | |
- name: REFERENCE - Variables and Workflow Contexts | |
run: | | |
echo "workflow: ${{ github.workflow }}" | |
echo "job_id: ${{ github.job }}" | |
echo "job status: ${{ job.status }}" | |
echo "commit ref name: ${{ github.ref_name }}" | |
echo "branch name: ${{ github.ref }}" | |
echo "latest tag: ${{ steps.get_tag.outputs.latest_tag }}" | |
echo "poetry app version: ${{ steps.app_version.outputs.poetry_app_version }}" |