-
Notifications
You must be signed in to change notification settings - Fork 215
57 lines (44 loc) · 1.35 KB
/
tests.yaml
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
52
53
54
55
56
57
name: Run tests
on:
push:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[skip-tests]')"
env:
JUPYTER_TOKEN: 70834f1904c29ae921ce0b030ceb7f25dd7b309a3fd1677dea6f3cf207c89012
steps:
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Spin up test dependencies with Docker Compose
run: |
docker-compose -f docker-compose.test.yaml up -d
- name: Wait for services to be ready
run: |
# Replace 'service-name' and port if needed
while ! nc -z localhost 8888; do
echo "Waiting for service to be ready..."
sleep 2
done
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build packages
run: yarn build --filter="./packages/*"
- name: Run tests
run: yarn test
- name: Tear down Docker Compose
if: always()
run: docker-compose -f docker-compose.test.yaml down