1- name : Continuous testing and publication to NPM from 'main'
1+ name : Continuous Testing and Publication
22
3- on :
4- workflow_dispatch :
5- push :
3+ on : [push]
64
75concurrency :
86 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
97 cancel-in-progress : true
108
11-
129jobs :
10+ run-py-linter :
11+ runs-on : ubuntu-20.04
12+ strategy :
13+ matrix :
14+ python-version : [3.8.6]
15+
16+ steps :
17+ - name : Checkout this repository
18+ uses : actions/checkout@v4
19+ with :
20+ lfs : true
21+
22+ - name : Checkout actions repository
23+ uses : actions/checkout@v4
24+ with :
25+ repository : Exabyte-io/actions
26+ token : ${{ secrets.BOT_GITHUB_TOKEN }}
27+ path : actions
28+
29+ - name : Run ruff linter
30+ uses : ./actions/py/lint
31+ with :
32+ python-version : ${{ matrix.python-version }}
33+
34+ run-py-tests :
35+ needs : run-py-linter
36+ runs-on : ubuntu-20.04
37+ strategy :
38+ matrix :
39+ python-version :
40+ - 3.8.x
41+ - 3.9.x
42+ - 3.10.x
43+ - 3.11.x
44+
45+ steps :
46+ - name : Checkout this repository
47+ uses : actions/checkout@v4
48+ with :
49+ lfs : true
50+
51+ - name : Checkout actions repository
52+ uses : actions/checkout@v4
53+ with :
54+ repository : Exabyte-io/actions
55+ token : ${{ secrets.BOT_GITHUB_TOKEN }}
56+ path : actions
57+
58+ - name : Run python unit tests
59+ uses : ./actions/py/test
60+ with :
61+ python-version : ${{ matrix.python-version }}
62+ unit-test-directory : tests/py/unit
63+ bot-ssh-key : ${{ secrets.BOT_GITHUB_KEY }}
1364
1465 run-js-tests :
1566 runs-on : ubuntu-latest
16- if : github.repository != 'Exabyte-io/template-definitions'
1767 strategy :
1868 matrix :
19- node-version : [14.x, 20.x]
69+ node-version :
70+ - 14.x
71+ - 20.x
2072
2173 steps :
2274 - name : Checkout this repository
2375 uses : actions/checkout@v4
76+ with :
77+ lfs : true
2478
2579 - name : Checkout actions repository
2680 uses : actions/checkout@v4
@@ -31,18 +85,22 @@ jobs:
3185
3286 - name : Run JS validate
3387 uses : ./actions/js/validate
88+ with :
89+ node-version : ' 14.x'
90+ skip-eslint : ' true'
3491
3592 - name : Run JS tests
3693 uses : ./actions/js/test
3794 with :
3895 node-version : ${{ matrix.node-version }}
3996
4097 publish-js-package :
41- needs : [run-js-tests]
98+ needs :
99+ - run-js-tests
100+ - run-py-tests
101+ - run-py-linter
42102 runs-on : ubuntu-latest
43- if : (github.repository != 'Exabyte-io/template-definitions') && (github.ref_name == 'main')
44- outputs :
45- release-version : ${{ steps.publish.outputs.tag-name }}
103+ if : (github.repository != 'Exabyte-io/template-definitions-js-py') && (github.ref_name == 'main')
46104
47105 steps :
48106 - name : Checkout this repository
@@ -56,42 +114,72 @@ jobs:
56114 path : actions
57115
58116 - name : Publish JS release
59- id : publish
60117 uses : ./actions/js/publish
61118 with :
62119 node-version : 14.19.x
63120 npm-token : ${{ secrets.NPM_TOKEN }}
64121 github-token : ${{ secrets.BOT_GITHUB_TOKEN }}
65122
66- create-pr-in-a-dependant :
67- needs : [publish-js-package]
123+ publish-py-package :
124+ needs :
125+ - run-js-tests
126+ - run-py-tests
127+ - run-py-linter
68128 runs-on : ubuntu-latest
69- if : (github.repository != 'Exabyte-io/template-definitions') && (github.ref_name == 'main')
70- strategy :
71- matrix :
72- target-repository :
73- - Exabyte-io/ade.js
74- - Exabyte-io/application-flavors
75- - Exabyte-io/ide.js
76- - Exabyte-io/made.js
77- - Exabyte-io/mode.js
78- - Exabyte-io/prode.js
79- - Exabyte-io/wode.js
80- - Exabyte-io/materials-designer
81- - Exabyte-io/web-app
129+ if : (github.repository != 'Exabyte-io/template-definitions-js-py') && (github.ref_name == 'main')
82130
83131 steps :
84- - name : Checkout actions repository
85- uses : actions/checkout@v4
86- with :
87- repository : Exabyte-io/actions
88- token : ${{ secrets.BOT_GITHUB_TOKEN }}
89- path : actions
90-
91- - name : Create a PR
92- uses : ./actions/git/pull-request
93- with :
94- github-token : ${{ secrets.BOT_GITHUB_TOKEN }}
95- target-repository : ${{ matrix.target-repository }}
96- source-package-name : " @exabyte-io/code.js"
97- target-version : ${{ needs.publish-js-package.outputs.release-version }}
132+ - name : Checkout this repository
133+ uses : actions/checkout@v4
134+ with :
135+ lfs : true
136+
137+ - name : Checkout actions repository
138+ uses : actions/checkout@v4
139+ with :
140+ repository : Exabyte-io/actions
141+ token : ${{ secrets.BOT_GITHUB_TOKEN }}
142+ path : actions
143+
144+ - name : Publish python release
145+ uses : ./actions/py/publish
146+ with :
147+ python-version : 3.8.x
148+ github-token : ${{ secrets.BOT_GITHUB_TOKEN }}
149+ pypi-api-token : ${{ secrets.PYPI_API_TOKEN }}
150+ publish-tag : ' false'
151+
152+
153+ # TB disabled on 2024-03-21 as not practically useful at this time
154+ # create-pr-in-a-dependant:
155+ # needs: [publish-js-package]
156+ # runs-on: ubuntu-latest
157+ # if: (github.repository != 'Exabyte-io/template-definitions') && (github.ref_name == 'main')
158+ # strategy:
159+ # matrix:
160+ # target-repository:
161+ # - Exabyte-io/ade.js
162+ # - Exabyte-io/application-flavors
163+ # - Exabyte-io/ide.js
164+ # - Exabyte-io/made.js
165+ # - Exabyte-io/mode.js
166+ # - Exabyte-io/prode.js
167+ # - Exabyte-io/wode.js
168+ # - Exabyte-io/materials-designer
169+ # - Exabyte-io/web-app
170+ #
171+ # steps:
172+ # - name: Checkout actions repository
173+ # uses: actions/checkout@v4
174+ # with:
175+ # repository: Exabyte-io/actions
176+ # token: ${{ secrets.BOT_GITHUB_TOKEN }}
177+ # path: actions
178+ #
179+ # - name: Create a PR
180+ # uses: ./actions/git/pull-request
181+ # with:
182+ # github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
183+ # target-repository: ${{ matrix.target-repository }}
184+ # source-package-name: "@exabyte-io/code.js"
185+ # target-version: ${{ needs.publish-js-package.outputs.release-version }}
0 commit comments