Teams for file paths (#130) #553
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
ci-data: | |
runs-on: ubuntu-latest | |
outputs: | |
result: ${{ steps.fetch.outputs.result }} | |
steps: | |
- id: fetch | |
uses: oxidize-rb/actions/fetch-ci-data@v1 | |
with: | |
stable-ruby-versions: | | |
# See https://github.com/bytecodealliance/wasmtime-rb/issues/286 | |
# for details. | |
exclude: [head] | |
rspec: | |
runs-on: ${{ matrix.os }} | |
needs: ci-data | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
ruby: ${{ fromJSON(needs.ci-data.outputs.result).stable-ruby-versions }} | |
rust: ["stable"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
rustup-toolchain: ${{ matrix.rust }} | |
bundler-cache: true | |
cargo-cache: false | |
- name: Run ruby tests | |
run: bundle exec rake | |
- name: Compile rust ext | |
run: bundle exec rake compile:release | |
static_type_check: | |
name: "Type Check" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: 3.3 | |
- name: Run static type checks | |
run: bundle exec srb tc | |
notify_on_failure: | |
runs-on: ubuntu-latest | |
needs: [rspec, static_type_check] | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
steps: | |
- uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} |