This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (61 loc) · 2.26 KB
/
test.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
64
65
66
67
68
69
70
71
72
73
74
name: Test
on:
pull_request:
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: "riotkit-org/backup-repository"
permissions:
packages: write
jobs:
test-and-release-snapshot:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build
run: "make build"
- name: Test
run: "make test"
if: "!contains(github.event.head_commit.message, '!test skip')"
- name: Convert coverage to lcov format
uses: jandelgado/[email protected]
if: "!contains(github.event.head_commit.message, '!test skip')"
- name: Coveralls
uses: coverallsapp/[email protected]
if: "!contains(github.event.head_commit.message, '!test skip')"
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
# =======
# Docker
# =======
- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and release to container registry
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:snapshot
labels: ${{ steps.meta.outputs.labels }}
test-on-kubernetes:
uses: riotkit-org/.github/.github/workflows/python.release.yaml@main
with:
pythonVersion: 3.11
testCmd: "make k3d skaffold-deploy integration-test"