-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.01 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
name: Test
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
PHP_VERSION:
- "8.0"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
echo UID=`id -u` >> $GITHUB_ENV
echo GID=`id -g` >> $GITHUB_ENV
- name: Build
run: docker-compose build
env:
PHP_VERSION: ${{ matrix.PHP_VERSION }}
- name: Install
run: docker-compose run php composer install
- name: Test
run: docker-compose run -e COVERAGE_OPTIONS php composer test
env:
COVERAGE_OPTIONS: --coverage-text --coverage-clover coverage.xml
- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -f coverage.xml
if: github.ref == 'refs/heads/main'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Clean
run: docker-compose down
if: always()