Skip to content

Commit

Permalink
Modernize GitHub Tests Action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Sep 4, 2022
1 parent 6cd5f73 commit f4572da
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,38 @@ jobs:
strategy:
matrix:
node: [12, 14, 16]

steps:
- uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-yarn-
- name: Install Playwright
uses: microsoft/playwright-github-action@v1

- name: Yarn install
run: yarn
- name: Run JavaScript Tests
run: yarn run test
- uses: actions/checkout@master

- name: Setup Node v${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Yarn install
run: yarn

- name: Run JavaScript Tests
run: yarn run test


ruby_test:
name: Ruby Test Action
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [2.7, '3.0', 3.1]
ruby: [2.7, '3.0', 3.1]

steps:
- uses: actions/checkout@master
- uses: actions/checkout@master

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Set up Ruby v${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run ruby tests
run: bundle exec rake test_ruby
- name: Run ruby tests
run: bundle exec rake test_ruby

0 comments on commit f4572da

Please sign in to comment.