feat: initial
This commit is contained in:
commit
b04a255b4c
17 changed files with 6509 additions and 0 deletions
32
.forgejo/workflows/check-build.yaml
Normal file
32
.forgejo/workflows/check-build.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: "Check build"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
check-dist:
|
||||
runs-on: stackit-docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Rebuild Action
|
||||
run: npm run build
|
||||
- name: Check for uncommitted changes
|
||||
run: |
|
||||
if [[ -n "$(git status --porcelain dist/)" ]]; then
|
||||
echo "::error::Distribution file is not up to date. Please run 'npm run build' and commit dist/index.js."
|
||||
exit 1
|
||||
fi
|
||||
23
.forgejo/workflows/check-pr-title.yaml
Normal file
23
.forgejo/workflows/check-pr-title.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Check PR title
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- edited
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: stackit-docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.forgejo
|
||||
- name: Check PR title
|
||||
uses: https://stackit-solutions.git.onstackit.cloud/actions/check-conventional-commit@v1
|
||||
with:
|
||||
value: ${{ github.event.pull_request.title }}
|
||||
64
.forgejo/workflows/test.yaml
Normal file
64
.forgejo/workflows/test.yaml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
name: "Run tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
env:
|
||||
S3_ENDPOINT: "http://localhost:9090"
|
||||
|
||||
jobs:
|
||||
integration-tests:
|
||||
services:
|
||||
s3mock:
|
||||
image: adobe/s3mock:latest
|
||||
env:
|
||||
COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS: "integration-test"
|
||||
COM_ADOBE_TESTING_S3MOCK_STORE_REGION: "us-east-1"
|
||||
ports:
|
||||
- "9090:9090"
|
||||
name: "Run vitest integration tests"
|
||||
runs-on: stackit-docker
|
||||
steps:
|
||||
- name: Wait for S3Mock
|
||||
run: |
|
||||
echo "Waiting for S3Mock on $S3_ENDPOINT/favicon.ico"
|
||||
|
||||
SECONDS=0
|
||||
|
||||
while true; do
|
||||
CURRENT_TIME="$(date +%s)"
|
||||
|
||||
if curl -sfo /dev/null "$S3_ENDPOINT/favicon.ico"; then
|
||||
echo "S3Mock is ready (took $SECONDS seconds)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$SECONDS" -ge 30 ]; then
|
||||
echo "::error::S3Mock did not start up in time (30s timeout reached)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
echo "::error::S3Mock did not start up in time"
|
||||
exit 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build action
|
||||
run: npm run build
|
||||
- name: Run tests
|
||||
run: npx vitest run
|
||||
Loading…
Add table
Add a link
Reference in a new issue