-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.21 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
44
45
46
47
48
49
50
51
name: Integration Test
on:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
main:
timeout-minutes: 20
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Copy .env file
run: cp .env.testing.docker .env
- name: Build infra
run: docker compose build
- name: Build Observe API
run: docker compose build
- name: Temp 1
run: docker ps
- name: Run Observe API
run: docker compose up -d
- name: Temp 2
run: docker ps
- name: Run Vitest
run: yarn run vitest --run
- name: Collect Logs on Failure (Observe)
if: failure()
run: docker compose logs
- name: Cleanup
if: always()
run: docker compose down