Skip to content

Commit

Permalink
integration tests enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Dec 3, 2023
1 parent a85f8dc commit 6c835f8
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 246 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ jobs:
- name: Running unit tests
run: npm run test:unit

# test_integration:
# name: Integration Tests
# needs:
# - lint
# - test_unit
# runs-on: self-hosted
# strategy:
# max-parallel: 1
# matrix:
# node-version: [18.x, 20.x]
# steps:
# - name: Creating `.env` file
# run: |
# touch .env
# echo HOST=${{ secrets.HOST }} >> .env
# echo EMAIL=${{ secrets.EMAIL }} >> .env
# echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
# - name: Running integration tests
# run: npm run test:integration
test_integration:
name: Integration Tests
needs:
- lint
- test_unit
runs-on: self-hosted
strategy:
max-parallel: 1
matrix:
node-version: [18.x, 20.x]
steps:
- name: Creating `.env` file
run: |
touch .env
echo HOST=${{ secrets.HOST }} >> .env
echo EMAIL=${{ secrets.EMAIL }} >> .env
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
- name: Running integration tests
run: npm run test:integration
49 changes: 22 additions & 27 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,26 @@ jobs:
- name: Running unit tests
run: npm run test:unit

# test_integration:
# name: Integration Tests
# needs:
# - lint
# - test_unit
# runs-on: self-hosted
# steps:
# - name: Creating `.env` file
# run: |
# touch .env
# echo HOST=${{ secrets.HOST }} >> .env
# echo EMAIL=${{ secrets.EMAIL }} >> .env
# echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
# - name: Running integration tests
# run: npm run test:integration
test_integration:
name: Integration Tests
needs:
- lint
- test_unit
runs-on: self-hosted
steps:
- name: Creating `.env` file
run: |
touch .env
echo HOST=${{ secrets.HOST }} >> .env
echo EMAIL=${{ secrets.EMAIL }} >> .env
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
- name: Running integration tests
run: npm run test:integration

publish:
name: Package publish
needs:
- lint
- test_unit
- test_integration
runs-on: self-hosted
steps:
- name: Publishing
Expand Down Expand Up @@ -87,7 +86,7 @@ jobs:

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

- name: Checkout docs branch
uses: actions/checkout@v4
Expand Down Expand Up @@ -124,14 +123,13 @@ jobs:
node-version: 18

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

- name: Create and Push Git Tag
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
TAG="v${{ steps.pkg.outputs.version }}"
TAG="v${{ env.version }}"
git tag $TAG
git push origin $TAG
Expand All @@ -150,8 +148,7 @@ jobs:
node-version: 18

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

- name: Extract Changelog Entry
id: changelog
Expand All @@ -167,8 +164,6 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.pkg.outputs.version }}
name: Release v${{ steps.pkg.outputs.version }}
tag_name: v${{ env.version }}
name: Release v${{ env.version }}
body: ${{ env.CHANGELOG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [1.7.2] - 2023-12-01
### [1.7.2] - 2023-12-01

Changes in this version:

Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"types": "out/index.d.ts",
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build && npm run test && npm run lint",
"test": "npm run test:unit",
"test": "npm run test:unit && npm run test:integration",
"prettier": "prettier --write src",
"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",
"lint": "eslint src tests --ext .ts",
Expand Down Expand Up @@ -51,7 +50,7 @@
"@typescript-eslint/parser": "^6.13.1",
"ava": "^5.3.1",
"dotenv": "^16.3.1",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand Down
Loading

0 comments on commit 6c835f8

Please sign in to comment.