-
Notifications
You must be signed in to change notification settings - Fork 6
87 lines (74 loc) · 2.42 KB
/
Copy pathcodeception.yml
File metadata and controls
87 lines (74 loc) · 2.42 KB
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
name: Codeception
on:
workflow_call:
inputs:
make:
required: false
type: string
default: "tests"
php:
required: false
type: string
default: "8.2"
composer:
required: false
type: string
default: "composer install --no-interaction --no-progress --prefer-dist"
coverage:
required: false
type: boolean
default: false
env:
extensions: "json"
tools: "composer:v2"
cache-version: "1"
jobs:
tests:
name: "Codeception (${{ inputs.php }})"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
- name: "Setup PHP cache environment"
id: "extcache"
uses: "shivammathur/cache-extensions@v1"
with:
php-version: "${{ inputs.php }}"
extensions: "${{ env.extensions }}"
key: "${{ env.cache-version }}"
- name: "Cache PHP extensions"
uses: "actions/cache@v5"
with:
path: "${{ steps.extcache.outputs.dir }}"
key: "${{ steps.extcache.outputs.key }}"
restore-keys: "${{ steps.extcache.outputs.key }}"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ inputs.php }}"
extensions: "${{ env.extensions }}"
tools: "${{ env.tools }}"
- name: "Setup problem matchers for PHP"
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
- name: "Get Composer cache directory"
id: "composercache"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache PHP dependencies"
uses: "actions/cache@v5"
with:
path: "${{ steps.composercache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "${{ runner.os }}-composer-"
- name: "Install dependencies"
run: "${{ inputs.composer }}"
- name: "Run Codeception"
run: "make ${{ inputs.make }}"
- name: "Coveralls.io"
if: ${{ inputs.coverage == true }}
env:
CI_NAME: github
CI: true
COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.7.0/php-coveralls.phar
php php-coveralls.phar --verbose --config tests/.coveralls.yml