refaktorointia
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 18s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m39s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 1m5s
CI Feature / Report Summary (push) Successful in 4s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 18s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m39s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 1m5s
CI Feature / Report Summary (push) Successful in 4s
This commit is contained in:
@@ -22,13 +22,10 @@ Ei API-kutsuja. Luotetaan Gitean omaan job-statukseen.
|
||||
API:a käytetään raporttilinkin upottamiseksi commit-näkymään.
|
||||
|
||||
```
|
||||
PENDING → testit → publish (always) → status (always, exit-koodin mukaan)
|
||||
testit → publish (always) → status (always, exit-koodin mukaan)
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Set Gitea status to PENDING
|
||||
run: bash .ci/scripts/report-status.sh pending "Running tests..." ci-bats
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -46,9 +43,9 @@ PENDING → testit → publish (always) → status (always, exit-koodin mukaan)
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${EXIT}" = "0" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Bats tests OK" ci-bats bats
|
||||
bash .ci/scripts/report-status.sh success "Link to Bats reports" unit-tests bats
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Bats tests FAILED" ci-bats bats
|
||||
bash .ci/scripts/report-status.sh failure "Link to Bats reports" unit-tests bats
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -57,13 +54,13 @@ PENDING → testit → publish (always) → status (always, exit-koodin mukaan)
|
||||
API:a käytetään Docker registry -linkin upottamiseksi.
|
||||
|
||||
```
|
||||
PENDING → build → push → SUCCESS (registry-linkillä) / FAILURE
|
||||
build → push → SUCCESS (registry-linkillä) / FAILURE
|
||||
```
|
||||
|
||||
## Periaatteet
|
||||
|
||||
1. Gitea Actionsin natiivi job-status on ensisijainen. API:a käytetään vain
|
||||
custom-linkin tarpeeseen (ADR 0004).
|
||||
1. Gitea Actionsin natiivi job-status on ensisijainen — myös PENDING/Running-tila
|
||||
tulee natiivisti. API:a käytetään vain custom-linkin tarpeeseen (ADR 0004).
|
||||
2. `run`-komennon on nostettava virhe ylös — oli kyse tool-callista tai
|
||||
testivirheestä (ADR 0008).
|
||||
3. Test-jobit käyttävät `if: always()` publish- ja status-stepeissä — raportti
|
||||
|
||||
Reference in New Issue
Block a user