-
Notifications
You must be signed in to change notification settings - Fork 6
124 lines (117 loc) · 3.13 KB
/
ci.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: CI
on: [push]
env:
DOCKER_CACHE_PREFIX: "v1"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
poetry run ruff check
poetry run pytest tests/unit renku_notebooks
test-git-proxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '>=1.18.0'
- name: Test git proxy
run: |
cd git-https-proxy
go test -v
test-liveness-detector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.24.2
manifest-path: ./liveness-detector/pyproject.toml
cache: true
- name: Test liveness detector
run: |
cd liveness-detector
pixi run lint-and-fix
pixi run test
test-git-services:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- name: Install dependencies
run: |
cd git_services
poetry install
- name: Test git services
run: |
cd git_services
poetry run ruff check
poetry run pytest -v tests
test-secrets-mount:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: poetry
- name: Install dependencies
run: |
cd secrets-mount
poetry install --with dev
- name: Test secrets mount
run: |
cd secrets-mount
poetry run ruff check
poetry run pytest -v tests
publish-images:
runs-on: ubuntu-latest
needs:
- test
- test-git-proxy
- test-git-services
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up environment variables
run: |
echo "GIT_USER=Renku Bot" >> $GITHUB_ENV
echo "[email protected]" >> $GITHUB_ENV
- name: Push images
uses: SwissDataScienceCenter/renku-actions/[email protected]
env:
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Update component version
uses: SwissDataScienceCenter/renku-actions/[email protected]
env:
COMPONENT_NAME: renku-notebooks
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}