-
Notifications
You must be signed in to change notification settings - Fork 550
76 lines (75 loc) · 2.08 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "20 8 * * *"
workflow_dispatch:
inputs:
head:
description: "Commit reference at which to run tests"
required: false
base:
description: "Commit reference from which to evaluate diffs"
required: false
flags:
description: "Extra flags to pass to toys ci"
required: false
jobs:
CI:
if: ${{ github.repository == 'googleapis/google-cloud-ruby' }}
strategy:
matrix:
include:
- os: ubuntu-latest
ruby: "2.7"
task: "--test"
- os: ubuntu-latest
ruby: "3.0"
task: "--test"
- os: ubuntu-latest
ruby: "3.1"
task: "--test"
- os: ubuntu-latest
ruby: "3.2"
task: "--rubocop --build --test"
- os: ubuntu-latest
ruby: "3.2"
task: "--yard --linkinator"
- os: macos-latest
ruby: "3.2"
task: "--test"
- os: windows-latest
ruby: "3.2"
task: "--test"
- os: ubuntu-latest
ruby: "3.2"
task: "--rubocop-toplevel"
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
- name: Install NodeJS 16.x
uses: actions/setup-node@v4
with:
node-version: "16.x"
- name: Install tools
run: "gem install --no-document toys && npm install linkinator"
- name: Test ${{ matrix.task }}
run: |
toys ci -v ${{ matrix.task }} --github-event-name=${{ github.event_name }} --github-event-payload=${{ github.event_path }} ${{ github.event.inputs.flags }}
- name: Open Issues
if: ${{ failure() }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
toys ci report-failures --github-action-id=${{ github.run_id }} -v