This repository was archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (39 loc) · 1.33 KB
/
test.yml
File metadata and controls
41 lines (39 loc) · 1.33 KB
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
name: Run Tests
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Set up env
run: |
while read -r line; do
key=$(echo $line | cut -d= -f1)
value=$(echo $line | cut -d= -f2-)
echo "::add-mask::$value"
echo "$key=$value" >> $GITHUB_ENV
done < <(grep -o '^[^#]*' ./env/test.env)
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
with:
mariadb-version: 10.11
- name: Setup MariaDB environment
run: |
sudo mysql -u root -e "CREATE DATABASE $MARIADB_DATABASE;"
sudo mysql -u root -e "CREATE USER '$MARIADB_USERNAME'@'localhost' IDENTIFIED BY '$MARIADB_PASSWORD';"
sudo mysql -u root -e "GRANT ALL PRIVILEGES ON $MARIADB_DATABASE.* TO '$MARIADB_USERNAME'@'localhost';"
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test:no-reloading