CI test v3
CI / test (push) Failing after 12s
CI / release (push) Has been skipped

This commit is contained in:
Frog-Lover-Antony
2026-07-18 20:43:53 +03:00
parent a7c20687aa
commit e3b04a6c27
+11 -15
View File
@@ -12,8 +12,7 @@ on:
types: [created]
env:
WS: /workspace
GITEA_HOST: gitea.mse:80
GITEA_HOST: gitea.antonene.space
jobs:
test:
@@ -22,13 +21,12 @@ jobs:
image: alpine:latest
steps:
# --- Clone repo using x-access-token auth ---
# --- Clone repo (own workspace to avoid conflict with Gitea's auto-checkout) ---
- name: Checkout Source
run: |
apk add --no-cache git
rm -rf $WS
mkdir -p $WS
cd $WS
mkdir -p /workspace
cd /workspace
git clone "http://x-access-token:${{ secrets.PKG_TOKEN }}@${{ env.GITEA_HOST }}/${{ github.repository }}.git" .
git checkout ${{ github.sha }}
@@ -36,8 +34,8 @@ jobs:
- name: TSV Unit Tests
run: |
docker run --rm \
-v $WS:$WS \
-w $WS/tests \
-v /workspace:/workspace \
-w /workspace/tests \
node:22-slim \
node tsv-test.js
@@ -81,7 +79,7 @@ jobs:
- name: API Sanity Tests (in job container)
run: |
apk add --no-cache curl jq bash
cd $WS/tests && bash api-tests.sh
cd /workspace/tests && bash api-tests.sh
- name: Cleanup Test Container
if: always()
@@ -99,17 +97,15 @@ jobs:
- name: Checkout Source
run: |
apk add --no-cache git
rm -rf $WS
mkdir -p $WS
cd $WS
mkdir -p /workspace
cd /workspace
git clone "http://x-access-token:${{ secrets.PKG_TOKEN }}@${{ env.GITEA_HOST }}/${{ github.repository }}.git" .
git checkout ${{ github.sha }}
# --- Build release artifact ---
- name: Build Release Artifact
run: |
apk add --no-cache tar coreutils
cd $WS
cd /workspace
mkdir -p release/copyparty-content-tag
cp src/*.html src/*.css src/*.js release/copyparty-content-tag/
cd release
@@ -124,5 +120,5 @@ jobs:
curl -sSf -X POST \
-H "Authorization: token ${{ secrets.PKG_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @$WS/release/copyparty-content-tag.tar.gz \
--data-binary @/workspace/release/copyparty-content-tag.tar.gz \
"http://${{ env.GITEA_HOST }}/api/v1/repos/${{ github.repository }}/releases.attachments?name=copyparty-content-tag.tar.gz&tag=$TAG"