-
-
Notifications
You must be signed in to change notification settings - Fork 20
88 lines (71 loc) · 2.08 KB
/
tests.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
77
78
79
80
81
82
83
84
85
86
87
88
name: Tests
permissions:
# Read the baseline artifact in order to perform
# the AppMap comparison.
actions: read
# Commit the AppMap configuration.
# If the EndBug/add-and-commit is removed,
# this can be changed to 'read'.
contents: write
# Add check annotations to the source code when
# a problem is detected.
checks: write
# Add a comment to the pull request.
pull-requests: write
on:
# Run on pull request, so that the PR can be analyzed.
pull_request:
branches:
- '*'
# Run on merge to the base branch, so that the baseline
# AppMap archive can be brought up-to-date.
# If your base branch is not 'main', (e.g. 'master', 'develop'),
# change this accordingly.
push:
branches:
- main
# Run weekly, so that the baseline AppMap artifact does not expire.
schedule:
- cron: '0 0 * * 0'
jobs:
ruby_test:
name: Ruby Test Action
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: NPM Install
run: 'npm install --legacy-peer-deps'
- name: Install Playwright Browsers
run: 'npx playwright install chromium --with-deps'
- name: Prepare Tests
run: cd test/dummy && bundle exec rails test:prepare
- name: Run Tests
run: bundle exec rails test:all
- name: Save AppMaps
uses: actions/cache/save@v3
if: always()
with:
path: ./tmp/appmap
key: appmaps-${{ github.sha }}-${{ github.run_attempt }}
appmap-analysis:
if: always()
needs: [ruby_test]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis.yml@v1
permissions:
actions: read
contents: read
checks: write
pull-requests: write