-
-
Notifications
You must be signed in to change notification settings - Fork 161
40 lines (38 loc) · 1.68 KB
/
api_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
name: API tests
on:
pull_request:
jobs:
apicurltests:
strategy:
matrix:
php-version: [ '7.2', '8.0' ]
name: curl tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
# test the lowest version, to make sure checks pass on it
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
- name: Initialise
run: |
sudo composer self-update -q
- name: Install dependencies
run: |
sudo COMPOSER_MEMORY_LIMIT=-1 COMPOSER_PROCESS_TIMEOUT=60 composer update --prefer-dist --no-progress
- name: Initialise the database
run: |
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console server:start 127.0.0.1:8088
- name: create api user
run: php bin/console bolt:add-user apiuser apiuser%1 [email protected] API --roles=ROLE_WEBSERVICE
- name: check API user gets content
run: curl -fkI -u apiuser:apiuser%1 http://localhost:8088/api/contents
- name: check API user gets fields
run: curl -fkI -u apiuser:apiuser%1 http://localhost:8088/api/fields
- name: check API user gets relations
run: curl -fkI -u apiuser:apiuser%1 http://localhost:8088/api/relations