-
Notifications
You must be signed in to change notification settings - Fork 20
36 lines (31 loc) · 1017 Bytes
/
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
name: "Tests"
on: [pull_request]
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
services:
[
Plausible,
HubSpot
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git checkout HEAD^2
- name: Add Environment Variables
run: |
echo "PA_APIKEY=${{ secrets.PA_APIKEY }}" > .env
echo "PA_DOMAIN=${{ secrets.PA_DOMAIN }}" >> .env
echo "HS_APIKEY=${{ secrets.HS_APIKEY }}" >> .env
echo "OR_APIKEY=${{ secrets.OR_APIKEY }}" >> .env
echo "OR_WORKSPACEID=${{ secrets.OR_WORKSPACEID }}" >> .env
- name: Run ${{matrix.services}} Tests
run: |
docker run --env-file .env --rm -v $PWD:/app composer sh -c \
"composer install --ignore-platform-reqs && ./vendor/bin/phpunit --configuration phpunit.xml --filter ${{matrix.services}}"