-
-
Notifications
You must be signed in to change notification settings - Fork 28
43 lines (40 loc) · 1.1 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
name: Test Suite
on:
pull_request:
push:
branches:
- main
- 'renovate/*'
jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
strategy:
matrix:
node: [ '18.12.1', '20.11.1' ]
env:
- DB: sqlite3
NODE_ENV: testing
- DB: mysql8
NODE_ENV: testing-mysql
env:
DB: ${{ matrix.env.DB }}
NODE_ENV: ${{ matrix.env.NODE_ENV }}
database__connection__password: root
name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Shutdown MySQL
run: sudo service mysql stop
if: matrix.env.DB == 'mysql8'
- uses: daniellockyer/mysql-action@main
if: matrix.env.DB == 'mysql8'
with:
mysql version: '8.0'
mysql database: 'km_testing'
mysql root password: 'root'
- run: yarn
- run: yarn test