This repository has been archived by the owner on May 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (62 loc) · 1.95 KB
/
lambda-integration-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
59
60
61
62
63
64
name: integration test of nexus preconfigure lambda
'on':
push:
branches:
- master
pull_request: {}
workflow_dispatch: {}
workflow_run:
workflows:
- upgrade
jobs:
lambda-integration-test:
name: Lambda Integaration Test
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
python-version:
- 3.8
steps:
- uses: actions/checkout@v2
- name: 'Use python ${{ matrix.python-version }}'
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
- name: Replace Nexus properties
run: >
docker exec nexus sh -c "echo 'nexus.scripts.allowCreation=true' >>
/nexus-data/etc/nexus.properties"
- name: Restart Nexus
uses: 'docker://docker'
with:
args: docker restart nexus
- name: Install dependencies
run: >
python -m pip install --upgrade pip
pip install -r src/lambda.d/nexuspreconfigure/requirements.txt
pip install -r
src/lambda.d/nexuspreconfigure-integration-test/requirements.txt
- name: Fetch Nexus3 Password
id: nexus3-pass
run: |
bash src/lambda.d/nexuspreconfigure-integration-test/wait-for-nexus.sh
NEXUS_PASS=`docker exec nexus cat /nexus-data/admin.password`
echo "::set-output name=NEXUS_PASS::$NEXUS_PASS"
- name: Integration test
env:
NEXUS_PASS: '${{ steps.nexus3-pass.outputs.NEXUS_PASS }}'
run: |
cd src/lambda.d/
pytest -m integration
services:
nexus:
image: 'quay.io/travelaudience/docker-nexus:3.27.0'
ports:
- '8081:8081'
options: >-
--name nexus --rm --health-cmd "wget --server-response --spider
--quiet 'http://localhost:8081' 2>&1" --health-interval 10s
--health-timeout 3s --health-retries 30