worflow/test debug shell commands #23
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@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- run: python --version | |
- run: pipx install --python $(which python) poetry | |
- run: poetry install | |
- run: poetry show --latest | |
- run: poetry run pytest --disable-warnings --verbose | |
- run: | | |
echo "REMINDER: 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}'" | |
echo latest_tag="${latest_tag}" >> $GITHUB_OUTPUT | |
- name: Get Poetry application version | |
id: app_version | |
run: | | |
poetry_app_version="$(poetry version --short)" | |
echo poetry_app_version="v${poetry_app_version}" >> $GITHUB_OUTPUT | |
- name: Print some 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 }}" | |