-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (83 loc) · 2.39 KB
/
test.yaml
File metadata and controls
92 lines (83 loc) · 2.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Test
on:
push:
paths-ignore:
- ".chart/**"
- ".github/**"
workflow_dispatch:
jobs:
set-repo-name:
uses: ./.github/workflows/extract-repo-name.yaml
test:
runs-on: ubuntu-latest
needs: set-repo-name
steps:
- uses: actions/checkout@v5
name: Checkout
with:
fetch-depth: 1
# ADD APPROPRIATE TESTING STEPS HERE
# - name: Set up python
# id: setup-python
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"
# - name: Install dependencies
# env:
# PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
# run: |
# pip3 install -r requirements.txt
# - name: Test
# run: |
# python3 test_api.py
deploy_to_staging:
if: github.ref == 'refs/heads/main'
needs:
- test
- set-repo-name
uses: parcelLab/ci/.github/workflows/deployment.yaml@v8
with:
appName: ${{ needs.set-repo-name.outputs.repo_name }}
author: ${{ github.event.pusher.name }}
chartInAppRepo: true
description: ${{ toJSON(github.event.head_commit.message) }}
env: staging
namespace: infra
ref: ${{ github.ref }}
versionKey: microservice.image.tag
secrets:
repoAccessToken: ${{ secrets.REPO_ACCESS_TOKEN }}
deploy_to_test:
if: github.ref == 'refs/heads/main'
needs:
- test
- set-repo-name
uses: parcelLab/ci/.github/workflows/deployment.yaml@v8
with:
appName: ${{ needs.set-repo-name.outputs.repo_name }}
author: ${{ github.event.pusher.name }}
chartInAppRepo: true
description: ${{ toJSON(github.event.head_commit.message) }}
env: test
namespace: infra
ref: ${{ github.ref }}
versionKey: microservice.image.tag
secrets:
repoAccessToken: ${{ secrets.REPO_ACCESS_TOKEN }}
deploy_to_prod:
if: github.ref_type == 'tag'
needs:
- test
- set-repo-name
uses: parcelLab/ci/.github/workflows/deployment.yaml@v8
with:
appName: ${{ needs.set-repo-name.outputs.repo_name }}
author: ${{ github.event.pusher.name }}
chartInAppRepo: true
description: ${{ toJSON(github.event.head_commit.message) }}
env: prod
namespace: infra
ref: ${{ github.ref }}
versionKey: microservice.image.tag
secrets:
repoAccessToken: ${{ secrets.REPO_ACCESS_TOKEN }}