-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
45 lines (38 loc) · 1.07 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
name: 'Run tests'
description: 'Run tests using a Dockerfile'
inputs:
node_version:
description: 'The Node.js version to use'
default: '16'
required: false
runs:
using: composite
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
persist-credentials: false
- name: 'Create .env file'
shell: bash
run: |
cat << EOF > .env
${{ inputs.environment }}
EOF
- uses: myparcelnl/actions/build-docker-image@v3
id: docker
with:
image: ${{ inputs.image_name }}
key: ${{ inputs.image_key || inputs.image_name }}
docker_args: ${{ inputs.docker_args }}
- name: 'Run Dockerfile'
shell: bash
run: docker run --env-file .env ${{ steps.docker.outputs.tagged_image }}
- name: 'Get coverage file from container'
shell: bash
run: docker cp $(docker ps -alq):/app/clover.xml .
- uses: actions/upload-artifact@v4
if: hashFiles('clover.xml') != ''
with:
name: coverage
path: clover.xml
retention-days: 14