forked from mtusi2026/mtusi2026lab7
Fix source download in Gitea CI
Lab 7 checks / application (push) Failing after 2m0s
Lab 7 checks / contracts (push) Successful in 2m20s
Lab 7 checks / application (push) Failing after 2m0s
Lab 7 checks / contracts (push) Successful in 2m20s
This commit is contained in:
@@ -6,7 +6,18 @@ jobs:
|
|||||||
contracts:
|
contracts:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Download source at workflow commit
|
||||||
|
env:
|
||||||
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
CI_REVISION: ${{ github.sha }}
|
||||||
|
run: |
|
||||||
|
archive="$(mktemp)"
|
||||||
|
trap 'rm -f -- "$archive"' EXIT
|
||||||
|
curl --fail --silent --show-error --location --retry 2 \
|
||||||
|
--connect-timeout 10 --max-time 90 \
|
||||||
|
"https://gitea.privcloud.tech/$CI_REPOSITORY/archive/$CI_REVISION.tar.gz" \
|
||||||
|
--output "$archive"
|
||||||
|
tar --extract --gzip --file="$archive" --strip-components=1
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
@@ -18,9 +29,18 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMPOSE_PROJECT_NAME: lab7-ci-${{ github.run_id }}-${{ github.run_attempt }}
|
COMPOSE_PROJECT_NAME: lab7-ci-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Download source at workflow commit
|
||||||
with:
|
env:
|
||||||
persist-credentials: false
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
CI_REVISION: ${{ github.sha }}
|
||||||
|
run: |
|
||||||
|
archive="$(mktemp)"
|
||||||
|
trap 'rm -f -- "$archive"' EXIT
|
||||||
|
curl --fail --silent --show-error --location --retry 2 \
|
||||||
|
--connect-timeout 10 --max-time 90 \
|
||||||
|
"https://gitea.privcloud.tech/$CI_REPOSITORY/archive/$CI_REVISION.tar.gz" \
|
||||||
|
--output "$archive"
|
||||||
|
tar --extract --gzip --file="$archive" --strip-components=1
|
||||||
- name: Check Docker runtime
|
- name: Check Docker runtime
|
||||||
run: |
|
run: |
|
||||||
docker info --format '{{.ServerVersion}}'
|
docker info --format '{{.ServerVersion}}'
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Local verification of the Gitea archive used by CI (download and extraction at the event SHA).
|
||||||
|
python3 scripts/check_contract.py
|
||||||
|
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||||
|
/home/kitsune/visotka/mtusi2026lab7/.venv/bin/python scripts/validate_openapi.py
|
||||||
|
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||||
|
PASS archive 494d6365e501fb5da2660ba783d7863ae3f52702
|
||||||
Reference in New Issue
Block a user