Skip to content

Commit fd509ea

Browse files
Release: v1.7.1 (#130)
* Dependencies updated * Add the "Content-Type" header to the movePage api call. (#131) This prevents the "Content-Type" automatically being set to "application/x-www-form-urlencoded". * ESLint fixed * #119 Update CI/CD flow (#132) --------- Co-authored-by: devramnage <[email protected]>
1 parent 6ca7678 commit fd509ea

File tree

6 files changed

+1514
-1473
lines changed

6 files changed

+1514
-1473
lines changed

.github/workflows/ci.yaml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,63 @@ on: push
33

44
jobs:
55
build:
6+
name: Build
67
runs-on: self-hosted
78
strategy:
8-
max-parallel: 1
99
matrix:
10-
node-version: [16.x, 18.x]
10+
node-version: [16.x, 18.x, 20.x]
1111
steps:
12-
- uses: actions/checkout@v2
12+
- name: Checkout sources
13+
uses: actions/checkout@v4
1314
- name: Use Node.js ${{ matrix.node-version }}
14-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v3
1516
with:
1617
node-version: ${{ matrix.node-version }}
17-
- run: npm ci
18-
- name: Create .env file
18+
- name: Installing dependencies
19+
run: npm ci
20+
- name: Building sources
21+
run: npm run build
22+
23+
lint:
24+
name: Lint Code
25+
needs: build
26+
runs-on: self-hosted
27+
strategy:
28+
matrix:
29+
node-version: [20.x]
30+
steps:
31+
- name: Linting
32+
run: npm run lint
33+
env:
34+
CI: true
35+
36+
test_unit:
37+
name: Unit Tests
38+
needs: build
39+
runs-on: self-hosted
40+
strategy:
41+
matrix:
42+
node-version: [18.x, 20.x]
43+
steps:
44+
- name: Running unit tests
45+
run: npm run test:unit
46+
47+
test_integration:
48+
name: Integration Tests
49+
needs:
50+
- lint
51+
- test_unit
52+
runs-on: self-hosted
53+
strategy:
54+
max-parallel: 1
55+
matrix:
56+
node-version: [18.x, 20.x]
57+
steps:
58+
- name: Creating `.env` file
1959
run: |
2060
touch .env
2161
echo HOST=${{ secrets.HOST }} >> .env
2262
echo EMAIL=${{ secrets.EMAIL }} >> .env
2363
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
24-
- run: npm run build
25-
- run: npm run test:unit
26-
- run: npm run test:e2e
27-
- run: npm run lint
28-
env:
29-
CI: true
64+
- name: Running integration tests
65+
run: npm run test:integration

.github/workflows/publish.yml

Lines changed: 89 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,106 @@ name: NPM publish
22
on: workflow_dispatch
33

44
jobs:
5-
publish:
5+
build:
6+
name: Build
67
runs-on: self-hosted
78
steps:
89
- name: Checkout sources
9-
uses: actions/checkout@v2
10-
- name: Use Node.js 16
11-
uses: actions/setup-node@v2
10+
uses: actions/checkout@v4
11+
- name: Use Node.js 18.x.x
12+
uses: actions/setup-node@v3
1213
with:
13-
node-version: 16
14-
registry-url: https://registry.npmjs.org/
15-
- name: Install dependencies
14+
node-version: 18
15+
- name: Installing dependencies
1616
run: npm ci
17-
- name: Create .env file
17+
- name: Building sources
18+
run: npm run build
19+
20+
lint:
21+
name: Lint Code
22+
needs: build
23+
runs-on: self-hosted
24+
steps:
25+
- name: Linting
26+
run: npm run lint
27+
env:
28+
CI: true
29+
30+
test_unit:
31+
name: Unit Tests
32+
needs: build
33+
runs-on: self-hosted
34+
steps:
35+
- name: Running unit tests
36+
run: npm run test:unit
37+
38+
test_integration:
39+
name: Integration Tests
40+
needs:
41+
- lint
42+
- test_unit
43+
runs-on: self-hosted
44+
steps:
45+
- name: Creating `.env` file
1846
run: |
1947
touch .env
2048
echo HOST=${{ secrets.HOST }} >> .env
2149
echo EMAIL=${{ secrets.EMAIL }} >> .env
2250
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
51+
- name: Running integration tests
52+
run: npm run test:integration
53+
54+
publish:
55+
name: Package publish
56+
needs:
57+
- test_integration
58+
runs-on: self-hosted
59+
steps:
2360
- name: Publishing
2461
run: npm publish
2562
env:
2663
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
64+
65+
publish-docs:
66+
name: Docs publish
67+
needs:
68+
- publish
69+
runs-on: self-hosted
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v4
73+
with:
74+
ref: master
75+
76+
- name: Set up Node.js
77+
uses: actions/setup-node@v3
78+
with:
79+
node-version: 18
80+
81+
- name: Install dependencies
82+
run: npm ci
83+
84+
- name: Generate docs
85+
run: npm run doc
86+
87+
- name: Extract version
88+
id: pkg
89+
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
90+
91+
- name: Checkout docs branch
92+
uses: actions/checkout@v4
93+
with:
94+
ref: docs
95+
clean: false
96+
97+
- name: Copy docs to root
98+
run: |
99+
cp -r docs/* .
100+
101+
- name: Commit and push docs
102+
run: |
103+
git config user.name "GitHub Actions"
104+
git config user.email "[email protected]"
105+
git add .
106+
git commit -m "Update documentation for version v${{ steps.pkg.outputs.version }}"
107+
git push

0 commit comments

Comments
 (0)