-
Notifications
You must be signed in to change notification settings - Fork 25
94 lines (76 loc) · 2.29 KB
/
Copy pathtest.yml
File metadata and controls
94 lines (76 loc) · 2.29 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Test
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test_strategy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4', '4.0']
omniauth_oauth2: ['1.8.0']
steps:
- uses: actions/checkout@v5
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: false
- name: Set matrix environment
run: echo "OMNIAUTH_OAUTH2=${{ matrix.omniauth_oauth2 }}" >> "$GITHUB_ENV"
- name: Install dependencies
run: |
bundle config set frozen false
bundle install --jobs 4 --retry 2
- name: Lint
run: bundle exec standardrb
- name: Strategy tests
run: bundle exec rake test_unit
- name: Strategy warnings check
run: |
bundle exec ruby -w -Itest test/omniauth_spotify_test.rb 2> warnings.log
if grep -q "warning:" warnings.log; then
cat warnings.log
exit 1
fi
test_rails_integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4', '4.0']
rails: ['~> 7.1.0', '~> 7.2.0', '~> 8.0.0', '~> 8.1.0']
omniauth_oauth2: ['1.8.0']
steps:
- uses: actions/checkout@v5
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: false
- name: Set matrix environment
run: |
echo "RAILS_VERSION=${{ matrix.rails }}" >> "$GITHUB_ENV"
echo "OMNIAUTH_OAUTH2=${{ matrix.omniauth_oauth2 }}" >> "$GITHUB_ENV"
- name: Install dependencies
run: |
bundle config set frozen false
bundle install --jobs 4 --retry 2
- name: Rails integration test
run: bundle exec rake test_rails_integration
- name: Rails integration warnings check
run: |
bundle exec ruby -w -Itest test/rails_integration_test.rb 2> warnings.log
if grep -q "warning:" warnings.log; then
cat warnings.log
exit 1
fi