-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (74 loc) · 2.1 KB
/
test-irrd.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: Build and test `irrd` container image
on:
pull_request:
branches:
- main
paths:
- "irrd/**"
workflow_dispatch:
jobs:
# create-runner:
# name: Create self-hosted Actions runner
# runs-on: ubuntu-24.04
# steps:
# - name: Create runner
# uses: MattKobayashi/[email protected]
# with:
# gh-api-token: ${{ secrets.GH_API_TOKEN }}
# gha-runner-apt-mirror: http://mirror.overthewire.com.au/ubuntu/
# gha-runner-labels: irrd
# gha-runner-tz: Australia/Brisbane
# ssh-host: 100.102.37.118
# ssh-user: matthew
# ts-oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
# ts-oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
# ts-tag: ci
build-setup:
name: Set up build environment
runs-on: ubuntu-24.04
outputs:
repo-owner: ${{ steps.repo-lowercase.outputs.REPO_OWNER }}
steps:
- name: Convert repository owner name to lowercase
id: repo-lowercase
run: |
echo "REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
build-test:
name: Build and test image
# runs-on: irrd
runs-on: ubuntu-24.04
needs: [build-setup]
strategy:
fail-fast: false
max-parallel: 1
matrix:
container: [irrd]
steps:
# Checkout repository
# https://github.com/actions/checkout
- name: Checkout repository
uses: actions/[email protected]
# Build and start image
- name: Build and start image
run: |
set -x
docker compose up --detach
working-directory: irrd
# Wait for container to start and run
- name: Wait for container to start and run
run: |
set -x
sleep 300
# Grab the container logs
- name: Grab container logs
run: |
set -x
docker compose logs irrd
working-directory: irrd
# Stop and remove containers
- name: Stop and remove container
run: |
set -x
docker compose down
working-directory: irrd