-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (49 loc) · 1.93 KB
/
test-and-release.yaml
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
name: Test and release a package
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: "pip install -r ./requirements.txt && pip install -r ./requirements-dev.txt && sudo apt-get install whois sshpass"
- name: Install project via setuptools
run: "rkd :install"
- name: Run unit tests
run: "rkd :test:unit"
- name: Run functional tests
run: "rkd :test:functional"
- name: "Inspect containers"
if: ${{ always() }}
run: "docker events --since 2h --until 0m"
release:
needs: [test]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Login to quay"
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: "pip install -r ./requirements.txt && pip install -r ./requirements-dev.txt"
- name: Release to docker registry (x86)
run: "RKD_COMPAT_SUBPROCESS=true rkd :release:docker:x86 --git-tag=${GITHUB_REF}"
- name: Release to PyPI
run: "rkd :release:pypi --token=${{ secrets.PYPI_TOKEN }}"
- name: Release to docker registry (arm)
run: "rkd :release:docker:arm --git-tag=${GITHUB_REF}"