forked from Hexlet/hexlet-sicp
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 1.54 KB
/
main.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
name: Main workflow
on:
pull_request:
branches:
- 'master'
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: mbstring, curl, dom, xml, zip, sqlite, xdebug
php-version: '7.4'
- name: Setup Racket
uses: Bogdanp/setup-racket@v1.1
with:
architecture: 'x64'
distribution: 'full'
variant: 'CS'
version: 'stable'
- name: Setup project
run: |
php -v
make setup
- name: Check lint
run: make lint
- name: Static analysis
run: make analyse
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: |
make test-coverage
- name: Execute tests with PostgreSQL
run: make test-coverage
env:
DB_CONNECTION: pgsql
DB_HOST: localhost
DB_DATABASE: postgres
DB_USERNAME: postgres
DB_PASSWORD: postgres
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: build/logs/clover.xml
fail_ci_if_error: true
- name: PHP Security Checker
uses: symfonycorp/security-checker-action@v2