Skip to content

ci: Introduce alls-green #523

ci: Introduce alls-green

ci: Introduce alls-green #523

Workflow file for this run

name: ruby_h_to_go
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- ".github/workflows/ruby_h_to_go.yml"
- "_tools/ruby_h_to_go/**"
- "Gemfile"
- "Gemfile.lock"
defaults:
run:
working-directory: _tools/ruby_h_to_go/
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- id: set-matrix
run: echo "matrix=$(cat matrix.json | jq -c)" >> $GITHUB_OUTPUT
working-directory: .github/workflows/
test:
name: "test (Go ${{ matrix.go }}, Ruby ${{ matrix.ruby }})"
needs:
- generate-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: ${{ matrix.go }}
- uses: ruby/setup-ruby@ac793fdd38cc468a4dd57246fa9d0e868aba9085 # v1.270.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: sudo apt-get update
- run: sudo apt-get install -y universal-ctags
- run: go install golang.org/x/tools/cmd/goimports@latest
- run: bundle exec rspec
- name: Slack Notification (not success)
uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
if: "! success()"
continue-on-error: true
with:
status: ${{ job.status }}
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
matrix: ${{ toJson(matrix) }}
all-pass-ruby_h_to_go:
if: always()
needs:
- test
runs-on: ubuntu-latest
steps:
- name: check dependent jobs
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}