forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 1.72 KB
/
test-checks.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
# Copyright 2021 Anupam Ghosh <[email protected]>,
# Gaurav Mishra <[email protected]>
# SPDX-License-Identifier: GPL-2.0 AND LGPL-2.1
name: c tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
C-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: ['7.4'] # Can be extended in future
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcppunit-dev
sudo ./utils/fo-installdeps -y -e
export PATH="/usr/lib/ccache/:$PATH"
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, gd, xml, zip, json, sqlite3, curl
env:
fail-fast: true
- name: Setup test database
env:
PGHOST: 127.0.0.1
PGPORT: 5432
run: |
./utils/prepare-test -afty
- name: Unit tests
env:
PGHOST: 127.0.0.1
PGPORT: 5432
run: |
make all phpvendors
make test-cli test-copyright test-lib test-monk \
test-nomos test-ojo test-reuser test-scheduler test-spdx2 \
test-unifiedreport test-www