-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (46 loc) · 1.85 KB
/
integration.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
name: Integration Tests
on: [push, pull_request]
jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: pip install --upgrade keyring==21.4.0 setuptools wheel twine coveralls tox
- name: Start Jenkins
id: start-jenkins
shell: bash
run: |
set -e
sudo docker run -dt --rm --name jenkins-master joelee2012/standalone-jenkins:latest
echo 'Waiting for Jenkins to start...'
until sudo docker logs jenkins-master | grep -q 'Jenkins is fully up and running'; do
sleep 1
done
ip=$(sudo docker inspect --format='{{.NetworkSettings.IPAddress}}' jenkins-master)
password=$(sudo docker exec jenkins-master cat /var/jenkins_home/secrets/initialAdminPassword)
version=$(sudo docker exec jenkins-master sh -c 'echo "$JENKINS_VERSION"')
port=8080
echo "url=http://${ip}:${port}/" >> $GITHUB_OUTPUT
echo "user=admin" >> $GITHUB_OUTPUT
echo "password=${password}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
- name: Run integration tests
env:
JENKINS_URL: ${{ steps.start-jenkins.outputs.url }}
JENKINS_USER: ${{ steps.start-jenkins.outputs.user }}
JENKINS_PASSWORD: ${{ steps.start-jenkins.outputs.password }}
JENKINS_VERSION: ${{ steps.start-jenkins.outputs.version }}
run: tox -e integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: tests/integration/
files: coverage.xml
flags: integration
verbose: true