Merge pull request #364 from ruby-go-gem/dependabot/bundler/rspec-tem… #507
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: 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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - 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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.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) }} | |
| notify: | |
| needs: | |
| - test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Slack Notification (success) | |
| uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2 | |
| if: always() | |
| continue-on-error: true | |
| with: | |
| status: ${{ job.status }} | |
| webhook-url: ${{ secrets.SLACK_WEBHOOK }} |