-
Notifications
You must be signed in to change notification settings - Fork 15
105 lines (76 loc) · 2.64 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
test-current:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Validate composer.json and composer.lock
run: composer validate
- name: Copy .env
run: cp .env.example .env
- name: Set testing key
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist --ignore-platform-reqs
- name: Fetch base images
run: |
docker pull ghcr.io/biigle/app:latest
docker pull ghcr.io/biigle/worker:latest
docker pull ghcr.io/biigle/pgvector:latest
- name: Start test database
run: |
docker compose up -d --no-build database_testing
sleep 5
- name: Run tests
run: docker compose run --rm -u 1001 worker php -d memory_limit=1G vendor/bin/phpunit --random-order
test-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
ref: dev-modules
fetch-depth: 1
- name: Validate composer.json and composer.lock
run: composer validate
- name: Copy .env
run: cp .env.example .env
- name: Set testing key
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist --ignore-platform-reqs
- name: Remove BIIGLE modules
run: rm -r vendor/biigle
- name: Update BIIGLE modules from source
run: composer update --no-ansi --no-interaction --no-scripts --no-suggest --prefer-source --ignore-platform-reqs biigle/*
- name: Fetch base images
run: |
docker pull ghcr.io/biigle/app:latest
docker pull ghcr.io/biigle/worker:latest
docker pull ghcr.io/biigle/pgvector:latest
- name: Start test database
run: |
docker compose up -d --no-build database_testing
sleep 5
- name: Run tests
run: docker compose run --rm -u 1001 worker php -d memory_limit=1G vendor/bin/phpunit --random-order
test-js-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Set registry authentication token
run: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install NPM packages
run: npm install
- name: Bundle js
run: npm run prod