Skip to content

chore: release v0.5.1 #136

chore: release v0.5.1

chore: release v0.5.1 #136

Workflow file for this run

name: Detect missing operation definitions
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: {}
schedule:
# 08:00 weekly on Monday
- cron: '0 8 * * 1'
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
missing-optypes:
name: Check for missing op type definitions
runs-on: ubuntu-latest
outputs:
should_notify: ${{ steps.check_status.outputs.result }}
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: "poetry"
- name: Update the project dependencies
run: poetry -C tests update
- name: Run the missing op types test
id: check_missing_optypes
run: poetry -C tests run -- cargo test --test integration -- --ignored missing_optypes
- name: Set output flags
id: check_status
if: always()
uses: actions/github-script@v5
with:
script: |
const outcome = ${{ steps.check_missing_optypes.outcome != 'success' }};
console.log(`The outcome is: ${outcome}`);
return outcome
result-encoding: string
notify-slack:
needs: missing-optypes
runs-on: ubuntu-latest
if: ${{ needs.missing-optypes.outputs.should_notify == 'true' && github.event_name == 'schedule' }}
steps:
- name: Compose the slack message
id: make_msg
run: |
MSG="msg=`tket-json-rs` is missing OpType definitions. See the failing check for more info.\nhttps://github.com/CQCL/tket-json-rs/actions/workflows/missing-ops.yml"
echo $MSG
echo $MSG >> "$GITHUB_OUTPUT"
- name: Send notification
uses: slackapi/[email protected]
with:
channel-id: 'C040CRWH9FF'
slack-message: ${{ steps.make_msg.outputs.msg }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}