Skip to content

Commit

Permalink
chore: add workflow to run tests in pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannibaratta committed Mar 16, 2024
1 parent 6820cbc commit dfd1908
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on:
pull_request:
paths:
- "service/**/*"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Yarn install
uses: borales/actions-yarn@v4
with:
cmd: install
dir: service

- name: Start dependencies
uses: borales/actions-yarn@v4
with:
cmd: deps:start
dir: service

- name: Prepare database
uses: borales/actions-yarn@v4
with:
cmd: db:migrate
dir: service

- name: Run tests
uses: borales/actions-yarn@v4
with:
cmd: test
dir: service

- name: Clean dependencies
uses: borales/actions-yarn@v4
with:
cmd: deps:down
dir: service

0 comments on commit dfd1908

Please sign in to comment.