-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (98 loc) · 2.93 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
buildDev:
name: Build & Test | Development
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
environment: development
env:
url: ${{ secrets.URL }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
PR_NUMBER: ${{ github.event.number }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
ARTIFACTORY_BASE_URL: ${{ secrets.ARTIFACTORY_BASE_URL }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Bootstrap Add-on
run: |
./ao bootstrap --url "$url" --username "$username" --password "$password"
- name: Deploy Add-on to Seeq Instance
run: |
./ao --suffix="$PR_NUMBER" deploy --clean
- name: Test Add-on
run: |
./ao --suffix="$PR_NUMBER" test
- name: Publish Add-on to Dev Repo
run: |
./ao --suffix="$PR_NUMBER" publish
buildProd:
name: Build & Test | Production
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
env:
url: ${{ secrets.URL }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Bootstrap Add-on
run: |
./ao bootstrap --url "$url" --username "$username" --password "$password"
- name: Deploy Add-on to Seeq Instance
run: |
./ao deploy --clean
- name: Test Add-on
run: |
./ao test
publishProd:
name: Publish | Production
needs: buildProd
runs-on: ubuntu-latest
environment: production
env:
url: ${{ secrets.URL }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
ARTIFACTORY_BASE_URL: ${{ secrets.ARTIFACTORY_BASE_URL }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Bootstrap Add-on
run: |
./ao bootstrap --url "$url" --username "$username" --password "$password"
- name: Distribute Add-on
run: |
./ao publish