Skip to content

Commit 51522fb

Browse files
authored
Merge pull request #2 from noprd/staging
Staging ---> Main
2 parents c19c3e8 + 4b21e6a commit 51522fb

File tree

4 files changed

+214
-1
lines changed

4 files changed

+214
-1
lines changed

.github/workflows/auto.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: QA (automatic)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- dev
8+
- develop
9+
- staging
10+
paths:
11+
- examples/**
12+
- src/**
13+
- tests/**
14+
# see <https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#discussion>
15+
types:
16+
- opened
17+
- reopened
18+
- unlocked
19+
- edited
20+
- assigned
21+
- review_requested
22+
- ready_for_review
23+
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
qa:
29+
name: QA
30+
# runs-on: [self-hosted, "${{ github.event.inputs.os }}", x64, gpu]
31+
runs-on: ${{ github.event.inputs.docker-image }}
32+
33+
environment: "${{ github.event.inputs.environment }}"
34+
env: {}
35+
36+
steps:
37+
- uses: actions/[email protected]
38+
39+
- name: Action - install justfile tool
40+
uses: extractions/setup-just@v2
41+
with:
42+
just-version: "1.14.0"
43+
44+
- name: Action - install zig
45+
uses: goto-bus-stop/[email protected]
46+
with:
47+
version: "0.14.0"
48+
49+
- name: Setup - ping basic tools and perform pre-installation
50+
shell: bash
51+
run: |-
52+
just --version
53+
zig version
54+
55+
- name: STEP 1 - build code
56+
shell: bash
57+
run: |-
58+
just setup
59+
just build
60+
61+
- name: STEP 2 - check linting
62+
shell: bash
63+
run: |-
64+
echo "Not yet implemented"
65+
66+
- name: STEP 3 - run unit tests
67+
shell: bash
68+
run: |-
69+
echo "Not yet implemented"
70+
71+
- name: STEP 4 - run behavioural tests
72+
shell: bash
73+
run: |-
74+
echo "Not yet implemented"
75+
76+
- name: STEP 4 - run as an example
77+
shell: bash
78+
run: |-
79+
just run-exe

.github/workflows/manual.yaml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: QA [+ CD] (manual)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
docker-image:
7+
description: Choice of docker image on which to run action.
8+
default: ubuntu-latest
9+
type: choice
10+
options:
11+
- ubuntu-latest
12+
13+
environment:
14+
description: 'Environment to run tests against'
15+
# NOTE: this option provides dropdown list of choices of environments set on GitHub (enterprise only)
16+
type: environment
17+
required: true
18+
default: 'local'
19+
20+
deploy:
21+
description: 'Deploy code?'
22+
type: boolean
23+
default: false
24+
25+
# NOTE: currently not used, but can use in future
26+
log-level:
27+
description: 'Log level'
28+
default: INFO
29+
type: choice
30+
options:
31+
- INFO
32+
- DEBUG
33+
- WARNING
34+
35+
permissions:
36+
contents: read
37+
38+
jobs:
39+
qa:
40+
name: QA
41+
# runs-on: [self-hosted, "${{ github.event.inputs.os }}", x64, gpu]
42+
runs-on: ${{ github.event.inputs.docker-image }}
43+
44+
environment: "${{ github.event.inputs.environment }}"
45+
env: {}
46+
47+
steps:
48+
- uses: actions/[email protected]
49+
50+
- name: Action - install justfile tool
51+
uses: extractions/setup-just@v2
52+
with:
53+
just-version: "1.14.0"
54+
55+
- name: Action - install zig
56+
uses: goto-bus-stop/[email protected]
57+
with:
58+
version: "0.14.0"
59+
60+
- name: Setup - ping basic tools and perform pre-installation
61+
shell: bash
62+
run: |-
63+
just --version
64+
zig version
65+
66+
- name: STEP 1 - build code
67+
shell: bash
68+
run: |-
69+
just setup
70+
just build
71+
72+
- name: STEP 2 - check linting
73+
shell: bash
74+
run: |-
75+
echo "Not yet implemented"
76+
77+
- name: STEP 3 - run unit tests
78+
shell: bash
79+
run: |-
80+
echo "Not yet implemented"
81+
82+
- name: STEP 4 - run behavioural tests
83+
shell: bash
84+
run: |-
85+
echo "Not yet implemented"
86+
87+
- name: STEP 4 - run as an example
88+
shell: bash
89+
run: |-
90+
just run-exe
91+
92+
# only performed if qa passes and option set
93+
deploy:
94+
name: DEPLOY
95+
needs: 'qa'
96+
# job only runs if deploy-checkbox is selected
97+
if: ${{ github.event.inputs.deploy == 'true' }}
98+
runs-on: ${{ github.event.inputs.docker-image }}
99+
100+
environment: "${{ github.event.inputs.environment }}"
101+
env: {}
102+
103+
steps:
104+
- uses: actions/[email protected]
105+
106+
- name: Action - install justfile tool
107+
uses: extractions/setup-just@v2
108+
with:
109+
just-version: "1.14.0"
110+
111+
- name: Action - install zig
112+
uses: goto-bus-stop/[email protected]
113+
with:
114+
version: "0.14.0"
115+
116+
- name: Setup - ping basic tools and perform pre-installation
117+
shell: bash
118+
run: |-
119+
just --version
120+
zig version
121+
122+
- name: STEP 1 - build code
123+
shell: bash
124+
run: |-
125+
just setup
126+
just build
127+
128+
- name: STEP 1 - upload artefact
129+
shell: bash
130+
run: |-
131+
echo "Not yet implemented"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
!/dist
4040
!/dist/VERSION
4141

42+
!/examples
43+
!/examples/**/
44+
4245
# ----------------------------------------------------------------
4346
# FORCE REMOVE
4447
# ----------------------------------------------------------------

dist/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.0
1+
0.0.1

0 commit comments

Comments
 (0)