-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (55 loc) · 1.74 KB
/
test.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
name: Test
on:
workflow_run:
workflows:
- deploy
- "Build"
branches:
- main
types:
- completed
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.gitversion.outputs.semVer }}
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
showConfig: true
configFilePath: ./GitVersion.yml
- name: Display SemVer
run: |
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
smoke:
runs-on: ubuntu-latest
needs:
- version
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download docker compose config
run: wget https://raw.githubusercontent.com/TechlauncherFireApp/docker/main/docker-compose.frontend.yml
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "ghcr.io/techlauncherfireapp/backend:latest"
replace: "ghcr.io/techlauncherfireapp/backend:${{ needs.version.outputs.version }}"
regex: false
- name: Docker Compose version
run: docker compose version
- name: Start containers
run: docker compose -f "docker-compose.frontend.yml" up -d --wait
- name: Test container
run: docker run --network container:backend-fireapp-1 appropriate/curl -s --retry 10 --retry-connrefused http://localhost:5000/