This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
95 lines (75 loc) · 2.15 KB
/
tests.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
name: Tests
on:
push:
branches:
- master
- release/*
- feature/*
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
composer-commands:
- install
- update
- update --prefer-lowest
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: imagick
- name: Set up PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql version: 10
postgresql user: ergonode
postgresql password: 123
- name: PHP version
run: php -v
- name: Install dependencies
run: composer ${{ matrix.composer-commands }}
- name: Validate dependencies
run: composer validate
- name: Create JWT SSH keys
run: |
openssl genrsa -aes256 -passout pass:1234 -out "config/jwt/private.pem" 4096
openssl rsa -pubout -in "config/jwt/private.pem" -passin pass:1234 -out "config/jwt/public.pem"
- name: Unit tests
run: bin/phing test:unit
- name: Behat tests
run: bin/phing test:behat
env:
DATABASE_URL: pgsql://ergonode:123@localhost:5432/ergonode_test?serverVersion=10&charset=utf8
- name: Archive artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: artifacts
path: |
./var/log
code_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: imagick
- name: PHP version
run: php -v
- name: Install dependencies
run: composer install
- name: Check module dependencies
run: bin/phing check:dependencies:module
- name: Check code style
run: bin/phing check:style
- name: Check doc header
run: bin/docheader check config features module public src tests