CI #1244
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: CI | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/actions/runner-images/issues/6283 | |
- run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH | |
if: startsWith(matrix.os, 'ubuntu') | |
- run: brew install --verbose Formula/*.rb | |
- run: brew test --verbose Formula/*.rb | |
# - run: tools/audit.sh # disable due to an upstream bug | |
formula: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: tools/formula.sh | |
- run: git add -N . && git diff --exit-code | |
if: github.event_name != 'schedule' | |
- id: diff | |
run: ci/formula.sh | |
if: github.event_name == 'schedule' | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
title: Update formula | |
body: | | |
Auto-generated by [create-pull-request][1] | |
[Please close and immediately reopen this pull request to run CI.][2] | |
[1]: https://github.com/peter-evans/create-pull-request | |
[2]: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs | |
branch: formula | |
if: github.event_name == 'schedule' && steps.diff.outputs.success == 'false' | |
spell-check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "REMOVE_UNUSED_WORDS=1" >>"${GITHUB_ENV}" | |
if: github.repository_owner == 'openrr' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') | |
- run: tools/spell-check.sh | |
- id: diff | |
run: | | |
set -euo pipefail | |
git config user.name "Taiki Endo" | |
git config user.email "[email protected]" | |
git add -N .github/.cspell | |
if ! git diff --exit-code -- .github/.cspell; then | |
git add .github/.cspell | |
git commit -m "Update cspell dictionary" | |
echo 'success=false' >>"${GITHUB_OUTPUT}" | |
fi | |
if: github.repository_owner == 'openrr' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
title: Update cspell dictionary | |
body: | | |
Auto-generated by [create-pull-request][1] | |
[Please close and immediately reopen this pull request to run CI.][2] | |
[1]: https://github.com/peter-evans/create-pull-request | |
[2]: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs | |
branch: update-cspell-dictionary | |
if: github.repository_owner == 'openrr' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' |