Skip to content

Commit e32bdba

Browse files
authored
chore: gitlab pipeline (#36)
* add gitlab pipeline definitions * fix stages * fix stages definitions * fix stages order and pnpm accessibility * fix playwright installation in gitlab pipeline * fix deployment of gitlab pages * fix pipeline * remove stages completely * simplify pipeline * use rules instead of only
1 parent 147c987 commit e32bdba

File tree

4 files changed

+58
-1
lines changed

4 files changed

+58
-1
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.node-template:
2+
image: node:22
3+
before_script:
4+
- corepack enable
5+
6+
include:
7+
- local: .gitlab/workflows/tests.yml
8+
- local: .gitlab/workflows/deploy.yml

.gitlab/workflows/deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
build:
2+
extends: .node-template
3+
script:
4+
- pnpm install
5+
- pnpm build --preset gitlab_pages
6+
artifacts:
7+
paths:
8+
- ./.output/public
9+
10+
deploy:
11+
extends: .node-template
12+
needs:
13+
- build
14+
script:
15+
# Adjust the deployment strategy here; e.g., for GitLab Pages:
16+
- mv ./.output/public public
17+
rules:
18+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
19+
pages:
20+
publish: public

.gitlab/workflows/tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
lint:
2+
extends: .node-template
3+
script:
4+
- pnpm install
5+
- pnpm lint
6+
7+
typecheck:
8+
extends: .node-template
9+
script:
10+
- pnpm install
11+
- pnpm typecheck
12+
13+
spelling:
14+
extends: .node-template
15+
script:
16+
- pnpm install
17+
- pnpm spelling
18+
19+
e2e:
20+
extends: .node-template
21+
script:
22+
- pnpm install --frozen-lockfile
23+
- pnpm playwright:install
24+
- pnpm test:e2e
25+
artifacts:
26+
when: always
27+
paths:
28+
- playwright-report/
29+
expire_in: 30 days

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"preview": "nuxt preview",
1717
"postinstall": "nuxt prepare",
1818
"test:e2e": "playwright test",
19-
"playwright:install": "playwright install && sudo apt-get install libatk1.0-0 libatk-bridge2.0-0 libcups2 libxkbcommon0 libatspi2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1"
19+
"playwright:install": "playwright install && playwright install-deps"
2020
},
2121
"dependencies": {
2222
"@nuxt/ui": "3.3.4",

0 commit comments

Comments
 (0)