Skip to content

Commit dfe8b45

Browse files
committed
ci: setup github actions
1 parent cd0511c commit dfe8b45

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/testing.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
env:
14+
DATABASE_URL: localhost
15+
DATABASE_PORT: 3306
16+
DATABASE_USER: user
17+
DATABASE_PASSWORD: password
18+
DATABASE_NAME: timezone_api
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Shutdown Ubuntu MySQL (SUDO)
24+
run: sudo service mysql stop
25+
26+
- uses: mirromutth/mysql-action@v1.1
27+
with:
28+
mysql database: ${{ env.DATABASE_NAME }}
29+
mysql user: ${{ env.DATABASE_USER }}
30+
mysql password: ${{ env.DATABASE_PASSWORD }}
31+
32+
- name: install
33+
run: npm ci
34+
35+
- name: test
36+
run: |
37+
npm test
38+
npm run test:e2e

0 commit comments

Comments
 (0)