-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (57 loc) · 1.98 KB
/
docker-build-test.yml
File metadata and controls
75 lines (57 loc) · 1.98 KB
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Build & Test Docker images
on:
pull_request:
jobs:
build_test_images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup env for Testing
working-directory: ./tests/cli-tests
run: |
sudo apt update
sudo apt-get install -y expect
./generate_test_env.sh
ln -s "$GITHUB_WORKSPACE/kc" /usr/local/bin/kc
ln -s "$GITHUB_WORKSPACE/admin" /usr/local/bin/admin
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Run Node
run: |
./start-node-ci cli
docker compose ps
sleep 30
- name: Run cli-tests
working-directory: ./tests
env:
KC_GATEKEEPER_URL: http://localhost:4224
KC_KEYMASTER_URL: http://localhost:4226
run: |
./run_cli_tests.sh --ci-redis
- name: Grab logs
if: always()
run: |
docker compose logs --no-color keymaster cli gatekeeper redis search-server > docker-compose-logs.txt
cat docker-compose-logs.txt
- name: Teardown Docker
run: |
./stop-node
- name: Upload docker logs & artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: docker-compose-logs
path: docker-compose-logs.txt
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: E2E Artifacts
path: tests/test-results/cli-tests.xml