-
-
Notifications
You must be signed in to change notification settings - Fork 26
57 lines (49 loc) · 1.64 KB
/
test.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
name: rspec
on:
workflow_dispatch:
push:
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ 2.6, 2.7, "3.0", 3.1, 3.2, 3.3 ]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Configure Bundler
run: |
ruby -v
# gem update --system
gem --version
gem install -N bundler -v 2.4
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles(format('{0}{1}', github.workspace, '/Gemfile.lock')) }}
restore-keys: ${{ runner.os }}-gem-
- name: Install ruby dependencies
run: |
bundle check || bundle config set --local path 'vendor/bundle' && bundle install --jobs 4 --retry 3
- name: rspec
run: |
bundle exec rspec spec/fcmpush_spec.rb
env:
TEST_PROJECT_ID: ${{ secrets.TEST_PROJECT_ID }}
TEST_DEVICE_TOKEN: ${{ secrets.TEST_DEVICE_TOKEN }}
GOOGLE_ACCOUNT_TYPE: ${{ secrets.GOOGLE_ACCOUNT_TYPE }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_EMAIL: ${{ secrets.GOOGLE_CLIENT_EMAIL }}
GOOGLE_PRIVATE_KEY: ${{ secrets.GOOGLE_PRIVATE_KEY }}
FCM_SERVER_KEY: ${{ secrets.FCM_SERVER_KEY }}
- name: slack notification
uses: 8398a7/action-slack@v3
if: always()
with:
status: ${{ job.status }}
author_name: 'github action fcmpush build'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}