-
-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (68 loc) · 2.2 KB
/
python-test-gefyra.yaml
File metadata and controls
70 lines (68 loc) · 2.2 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
name: pytest and try it yourself example
on:
workflow_dispatch: {}
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Poetry installation
run: |
poetry install
- name: Install k3d
shell: bash
run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
- name: Set Getdeck to no tracking
shell: bash
run: |
mkdir -p ~/.deck
cd ~/.deck
touch config.ini
echo "[telemetry]" >> config.ini
echo "track = False" >> config.ini
- name: Create a cluster using getdeck
run: |
poetry run coverage run -a -m getdeck get --name oauth2-demo --wait --timeout 180 https://github.com/gefyrahq/gefyra-demos.git
- name: Stop the cluster
run: |
poetry run coverage run -a -m getdeck stop https://github.com/gefyrahq/gefyra-demos.git
- name: Start the cluster again
run: |
poetry run coverage run -a -m getdeck get --name oauth2-demo https://github.com/gefyrahq/gefyra-demos.git
- name: Remove the cluster
run: |
poetry run coverage run -a -m getdeck remove --cluster https://github.com/gefyrahq/gefyra-demos.git
- name: Show coverage report
run: |
poetry run coverage report
- name: Upload coverage data to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
poetry run coveralls --service=github
coveralls:
name: Indicate completion to coveralls.io
# need secrets.GITHUB_TOKEN
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}