Skip to content

Commit

Permalink
chore: add test github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed Apr 6, 2024
1 parent 47aac97 commit 9497d1c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
test:
runs-on: ${{ matrix.os }}

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: nano_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

strategy:
matrix:
os: [ubuntu-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: current

- name: yarn install
run: |
yarn install
- name: yarn test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn lint
yarn test

0 comments on commit 9497d1c

Please sign in to comment.