ci: check if I can print the commit message #77
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Integration checks | |
on: | |
push: | |
tags: "*" | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: write | |
jobs: | |
dump_context: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub Context | |
env: { CONTENT: "${{ toJson(github) }}" } | |
run: | | |
"echo $CONTENT | jq" | |
"echo ${{ toJson(github.event) }} | jq" | |
lint_test_and_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout repository | |
- name: Notify pipeline start | |
run: | | |
bash cicd-scripts/ntfy-start.sh ${{ github.head_ref }} ${{ github.triggering_actor }} ${{ github.repository }} | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Load cache | |
id: black | |
uses: actions/cache@v4 | |
with: | |
path: black-install-folder | |
key: black-sat | |
- name: Download BLACK | |
if: steps.black.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/black-sat/black/releases/download/v0.10.6/black-sat-0.10.6.ubuntu20.04.x86_64.deb | |
mkdir black-install-folder | |
mv black-sat-0.10.6.ubuntu20.04.x86_64.deb black-install-folder/black-sat-0.10.6.ubuntu20.04.x86_64.deb | |
- name: Install Development dependencies | |
run: poetry install --only=dev | |
- name: Ruff linting | |
run: poetry run ruff check ltlf2asp | |
- name: Typecheck | |
run: poetry run mypy ltlf2asp | |
- name: Install dependencies | |
run: poetry install | |
- name: Build package | |
run: poetry build | |
- name: Run grammar tests | |
run: poetry run pytest tests/test_parser | |
- name: Install BLACK | |
run: | | |
sudo apt install -y ./black-install-folder/black-sat-0.10.6.ubuntu20.04.x86_64.deb | |
- name: Change executable name for BLACK | |
run: | | |
sudo mv $(which black) /usr/bin/black-sat | |
- name: Run solve randomized tests | |
run: | | |
poetry run pytest tests/test_solve_random_sample | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
gh release create ${{ github.ref_name }} dist/*.tar.gz --notes "" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Notify successful pipeline run | |
run: | | |
bash cicd-scripts/ntfy-success.sh ${{ github.head_ref }} ${{ github.triggering_actor }} ${{ github.repository }} | |
- name: Notify failed pipeline run | |
if: always() && failure() | |
run: | | |
bash cicd-scripts/ntfy-failure.sh ${{ github.head_ref }} ${{ github.triggering_actor }} ${{ github.repository }} |