-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (45 loc) · 1.5 KB
/
ci.yaml
File metadata and controls
61 lines (45 loc) · 1.5 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
name: ci
on: [push, pull_request]
jobs:
deployment-test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
run: echo "${{ secrets.HARBOR_CLI_PASSWORD }}" | docker login cerit.io -u "${{ secrets.HARBOR_CLI_USERNAME }}" --password-stdin
- name: run docker compose
run: |
docker compose --profile pulsar up -d --build
- name: install flask
run: pip install flask
- name: run upload_server.py
run: |
python tests/upload_server.py &
- name: Install dependencies
run: pip install .
- name: instal pytest
run: pip install pytest
- name: pytest run smoke tests
run: |
pytest tests/smoke_tests.py
- name: Set version from CHANGELOG
id: version
run: |
version=$(bash ci/version.sh CHANGELOG.md)
echo "::set-output name=version::$version"
- name: Tag Docker image
run: |
docker tag tesp-api:latest cerit.io/tesp-api/tesp-api:${{ steps.version.outputs.version }}
- name: Push Docker image
run: |
docker push cerit.io/tesp-api/tesp-api:${{ steps.version.outputs.version }}