-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.39 KB
/
unit-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
name: Matomo Scoper Unit Tests
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- 'main'
workflow_dispatch:
permissions:
actions: read
checks: none
contents: read
deployments: none
issues: read
packages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
concurrency:
group: unit-${{ github.ref }}
cancel-in-progress: true
jobs:
ScoperUnit:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
with:
lfs: true
persist-credentials: false
submodules: true
# TODO setup php, composer install w/ cache, run tests
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none
- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
working-directory: ${{ github.workspace }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-scoper-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-scoper
- run: composer install
- run: composer run test