-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
54 lines (50 loc) · 1.49 KB
/
action.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
name: 'Run Municipio Smoke Tests'
description: 'A custom action to run Municipio Smoke tests'
inputs:
sitemap-urls:
description: 'A comma-separated list of URLs to test'
required: true
shard:
description: 'The shard index to run'
default: 'false'
required: false
total-shards:
description: 'The total number of shards'
default: 'false'
required: false
runs:
using: 'composite'
steps:
- name: Checkout this repository
uses: actions/checkout@v4
with:
repository: helsingborg-stad/municipio-smoke-tests
token: ${{ github.token }}
ref: 'v1'
- name: Cache Composer dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: |
vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP with composer v2.
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
- name: Install dependencies
run: composer install --no-progress --no-suggest --no-interaction
shell: bash
- name: Run Municipio Smoke tests
run: |
if [ "${{ inputs.shard }}" != "false" ] && [ "${{ inputs.total-shards }}" != "false" ]; then
composer test -- --shard=${{ inputs.shard }}/${{ inputs.total-shards }}
else
composer test
fi
shell: bash
env:
SITEMAP_URLS: ${{ inputs.sitemap-urls }}