reorganize our CI stuff
This commit is contained in:
parent
22240f8365
commit
24b715d676
5 changed files with 51 additions and 40 deletions
|
|
@ -6,10 +6,6 @@ when:
|
|||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
- test-e2e
|
||||
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
memory: 'high'
|
||||
|
|
@ -18,26 +14,5 @@ steps:
|
|||
build:
|
||||
image: docker.io/node:20-alpine
|
||||
commands:
|
||||
- apk add --no-cache zip git
|
||||
- yarn --frozen-lockfile
|
||||
- yarn build
|
||||
- if [ "${CI_PIPELINE_EVENT}" = "push" ] || [ "${CI_PIPELINE_EVENT}" = "manual" ]; then zip -9qr ${CI_REPO_DEFAULT_BRANCH}.zip dist/; fi
|
||||
|
||||
upload-artifacts:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
settings:
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
update: true
|
||||
owner: 'pleroma'
|
||||
package_name: 'pleroma-fe-builds'
|
||||
package_version: ${CI_REPO_DEFAULT_BRANCH}
|
||||
file_source: ./${CI_REPO_DEFAULT_BRANCH}.zip
|
||||
file_name: latest.zip
|
||||
|
|
|
|||
42
.woodpecker/code-analisys.yaml
Normal file
42
.woodpecker/code-analisys.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
memory: 'high'
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
- test
|
||||
- test-e2e
|
||||
|
||||
clone:
|
||||
depth: 0
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
|
||||
steps:
|
||||
# Needed to generate coverage
|
||||
test:
|
||||
image: mcr.microsoft.com/playwright:v1.61.0-jammy
|
||||
environment:
|
||||
FF_NETWORK_PER_BUILD: "true"
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
||||
entrypoint: *script_file_entrypoint
|
||||
commands:
|
||||
- yarn --frozen-lockfile
|
||||
- yarn unit-ci-coverage
|
||||
|
||||
code-analysis:
|
||||
image: sonarsource/sonar-scanner-cli:11
|
||||
environment:
|
||||
SONAR_TOKEN:
|
||||
from_secret: sonarqube-token
|
||||
entrypoint: sonar-scanner
|
||||
|
|
@ -10,6 +10,10 @@ labels:
|
|||
platform: linux/amd64
|
||||
memory: 'high'
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
- test
|
||||
|
||||
variables:
|
||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
||||
user:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ labels:
|
|||
platform: linux/amd64
|
||||
memory: 'high'
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
variables:
|
||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
||||
user:
|
||||
|
|
@ -45,20 +48,6 @@ steps:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
code-analysis:
|
||||
image: sonarsource/sonar-scanner-cli:11
|
||||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
environment:
|
||||
SONAR_TOKEN:
|
||||
from_secret: sonarqube-token
|
||||
entrypoint: *script_file_entrypoint
|
||||
commands:
|
||||
- sonar-scanner
|
||||
|
||||
upload-artifacts:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
"dev": "node build/update-emoji.js && vite dev",
|
||||
"build": "node build/update-emoji.js && vite build",
|
||||
"unit": "node build/update-emoji.js && vitest --run --coverage",
|
||||
"unit-ci": "node build/update-emoji.js && vitest --run --coverage --browser.headless",
|
||||
"unit-ci": "node build/update-emoji.js && vitest --run --browser.headless",
|
||||
"unit-ci-coverage": "node build/update-emoji.js && vitest --run --coverage --browser.headless",
|
||||
"unit:watch": "node build/update-emoji.js && vitest --coverage",
|
||||
"e2e:pw": "playwright test --config test/e2e-playwright/playwright.config.mjs",
|
||||
"e2e": "sh ./tools/e2e/run.sh",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue