-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.13 KB
/
run-project-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: Run Project Tests
on:
workflow_dispatch:
inputs:
tests:
description: 'Test Projects'
default: '["piwik", "joomla", "cubecart", "openwebanalytics", "contao", "forkcms", "hotel-bookings", "opencats", "aioseo", "booking-calendar", "lead-generated"]'
env:
TESTING_PATH: /root/testing
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
test: ${{fromJson(github.event.inputs.tests)}}
env:
TEST_NAME: ${{ matrix.test }}
STAGE_NAME: ${{ matrix.test }}-test
IMAGE_TAG: quack:${{ matrix.test }}-test
ABS_PROJECT_PATH: /root/${{ matrix.test }}
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v3
- name: Build Quack Docker image
run: docker build . --target ${{ env.STAGE_NAME }} --file Dockerfile --tag ${{ env.IMAGE_TAG }}
- name: Make testing directory
run: docker run ${{ env.IMAGE_TAG}} mkdir -p ${{ env.TESTING_PATH }}
- name: Run ${{ env.TEST_NAME }} test
run: docker run ${{ env.IMAGE_TAG }} /bin/bash -c "python3 runner.py --output-path ${{ env.TESTING_PATH }} ${{ env.ABS_PROJECT_PATH }} && cat debug.log"