Skip to content

Commit f4572da

Browse files
committed
Modernize GitHub Tests Action
1 parent 6cd5f73 commit f4572da

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

.github/workflows/tests.yml

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,38 @@ jobs:
1515
strategy:
1616
matrix:
1717
node: [12, 14, 16]
18+
1819
steps:
19-
- uses: actions/checkout@master
20-
- name: Setup Node
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: ${{ matrix.node }}
24-
- name: Get yarn cache directory path
25-
id: yarn-cache-dir-path
26-
run: echo "::set-output name=dir::$(yarn cache dir)"
27-
- uses: actions/cache@v1
28-
id: yarn-cache
29-
with:
30-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31-
key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
32-
restore-keys: |
33-
${{ runner.os }}-${{ matrix.node }}-yarn-
34-
35-
- name: Install Playwright
36-
uses: microsoft/playwright-github-action@v1
37-
38-
- name: Yarn install
39-
run: yarn
40-
- name: Run JavaScript Tests
41-
run: yarn run test
20+
- uses: actions/checkout@master
21+
22+
- name: Setup Node v${{ matrix.node }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node }}
26+
cache: 'yarn'
27+
28+
- name: Yarn install
29+
run: yarn
30+
31+
- name: Run JavaScript Tests
32+
run: yarn run test
33+
4234

4335
ruby_test:
4436
name: Ruby Test Action
4537
runs-on: ubuntu-latest
4638
strategy:
4739
matrix:
48-
ruby-version: [2.7, '3.0', 3.1]
40+
ruby: [2.7, '3.0', 3.1]
4941

5042
steps:
51-
- uses: actions/checkout@master
43+
- uses: actions/checkout@master
5244

53-
- name: Set up Ruby ${{ matrix.ruby-version }}
54-
uses: ruby/setup-ruby@v1
55-
with:
56-
ruby-version: ${{ matrix.ruby-version }}
57-
bundler-cache: true
45+
- name: Set up Ruby v${{ matrix.ruby }}
46+
uses: ruby/setup-ruby@v1
47+
with:
48+
ruby-version: ${{ matrix.ruby }}
49+
bundler-cache: true
5850

59-
- name: Run ruby tests
60-
run: bundle exec rake test_ruby
51+
- name: Run ruby tests
52+
run: bundle exec rake test_ruby

0 commit comments

Comments
 (0)