Skip to content

Commit 6c835f8

Browse files
committed
integration tests enabled
1 parent a85f8dc commit 6c835f8

File tree

6 files changed

+59
-246
lines changed

6 files changed

+59
-246
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ jobs:
4444
- name: Running unit tests
4545
run: npm run test:unit
4646

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
59-
# run: |
60-
# touch .env
61-
# echo HOST=${{ secrets.HOST }} >> .env
62-
# echo EMAIL=${{ secrets.EMAIL }} >> .env
63-
# echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
64-
# - name: Running integration tests
65-
# run: npm run test:integration
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
59+
run: |
60+
touch .env
61+
echo HOST=${{ secrets.HOST }} >> .env
62+
echo EMAIL=${{ secrets.EMAIL }} >> .env
63+
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
64+
- name: Running integration tests
65+
run: npm run test:integration

.github/workflows/publish.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,26 @@ jobs:
3535
- name: Running unit tests
3636
run: npm run test:unit
3737

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
46-
# run: |
47-
# touch .env
48-
# echo HOST=${{ secrets.HOST }} >> .env
49-
# echo EMAIL=${{ secrets.EMAIL }} >> .env
50-
# echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
51-
# - name: Running integration tests
52-
# run: npm run test:integration
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
46+
run: |
47+
touch .env
48+
echo HOST=${{ secrets.HOST }} >> .env
49+
echo EMAIL=${{ secrets.EMAIL }} >> .env
50+
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
51+
- name: Running integration tests
52+
run: npm run test:integration
5353

5454
publish:
5555
name: Package publish
5656
needs:
57-
- lint
58-
- test_unit
57+
- test_integration
5958
runs-on: self-hosted
6059
steps:
6160
- name: Publishing
@@ -87,7 +86,7 @@ jobs:
8786

8887
- name: Extract version
8988
id: pkg
90-
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
89+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
9190

9291
- name: Checkout docs branch
9392
uses: actions/checkout@v4
@@ -124,14 +123,13 @@ jobs:
124123
node-version: 18
125124

126125
- name: Extract version from package.json
127-
id: pkg
128-
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
126+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
129127

130128
- name: Create and Push Git Tag
131129
run: |
132130
git config user.name "GitHub Actions"
133131
git config user.email "[email protected]"
134-
TAG="v${{ steps.pkg.outputs.version }}"
132+
TAG="v${{ env.version }}"
135133
git tag $TAG
136134
git push origin $TAG
137135
@@ -150,8 +148,7 @@ jobs:
150148
node-version: 18
151149

152150
- name: Extract version from package.json
153-
id: pkg
154-
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
151+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
155152

156153
- name: Extract Changelog Entry
157154
id: changelog
@@ -167,8 +164,6 @@ jobs:
167164
- name: Create GitHub Release
168165
uses: softprops/action-gh-release@v1
169166
with:
170-
tag_name: v${{ steps.pkg.outputs.version }}
171-
name: Release v${{ steps.pkg.outputs.version }}
167+
tag_name: v${{ env.version }}
168+
name: Release v${{ env.version }}
172169
body: ${{ env.CHANGELOG }}
173-
env:
174-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [1.7.2] - 2023-12-01
3+
### [1.7.2] - 2023-12-01
44

55
Changes in this version:
66

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"types": "out/index.d.ts",
1111
"scripts": {
1212
"build": "tsc",
13-
"prepublishOnly": "npm run build && npm run test && npm run lint",
14-
"test": "npm run test:unit",
13+
"test": "npm run test:unit && npm run test:integration",
1514
"prettier": "prettier --write src",
1615
"doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./src/index.ts --plugin typedoc-plugin-extras --footerDate --footerTime --footerTypedocVersion --favicon https://svgshare.com/i/bVi.svg",
1716
"lint": "eslint src tests --ext .ts",
@@ -51,7 +50,7 @@
5150
"@typescript-eslint/parser": "^6.13.1",
5251
"ava": "^5.3.1",
5352
"dotenv": "^16.3.1",
54-
"eslint": "^8.54.0",
53+
"eslint": "^8.55.0",
5554
"eslint-config-airbnb": "^19.0.4",
5655
"eslint-config-airbnb-typescript": "^17.1.0",
5756
"eslint-import-resolver-typescript": "^3.6.1",

0 commit comments

Comments
 (0)