-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.woodpecker.yml
68 lines (60 loc) · 1.92 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
variables:
cypress_browser_image: &cypress_browser_image 'cypress/included:cypress-13.6.6-node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1'
alpine: &alpine 'alpine:3.19.1'
start_server: &start_server
- npm run dev-server &
when:
event: [push, pull_request, tag]
steps:
- name: install
image: *cypress_browser_image
commands:
- npm install
- name: build
image: *cypress_browser_image
commands:
- npm run build
- npm run prepare-dev
- name: test_chrome
image: *cypress_browser_image
commands:
- <<: *start_server
- npx cypress run --browser chrome
when:
- status: [ success, failure ]
- name: test_firefox
image: *cypress_browser_image
commands:
- <<: *start_server
- npx cypress run --browser firefox
when:
- status: [ success, failure ]
- name: test_edge
image: *cypress_browser_image
commands:
- <<: *start_server
- npx cypress run --browser edge
when:
- status: [ success, failure ]
- name: archiving
image: *alpine
commands:
- apk add tar zip findutils
- mkdir -p dist/archives
- find dist/prod -type f -printf "%P\n" | tar -czf "dist/archives/pf-iframe-${CI_COMMIT_TAG##v}-prod.tar.gz" -C dist/prod -T -
- find dist/lib -type f -printf "%P\n" | tar -czf "dist/archives/pf-iframe-${CI_COMMIT_TAG##v}-lib.tar.gz" -C dist/lib -T -
- find dist/prod -type f -exec sh -c "zip dist/archives/pf-iframe-${CI_COMMIT_TAG##v}-prod.zip -j {}" \;
- find dist/lib -type f -exec sh -c "zip dist/archives/pf-iframe-${CI_COMMIT_TAG##v}-lib.zip -j {}" \;
when:
event: tag
- name: create_release
image: plugins/github-release
settings:
files:
- dist/archives/*.tar.gz
- dist/archives/*.zip
title: ${CI_COMMIT_TAG##v}
api-key:
from_secret: FOSSalyze_RELEASE_GITHUB_TOKEN
when:
event: tag