Skip to content

Commit

Permalink
Release: v1.7.1 (#130)
Browse files Browse the repository at this point in the history
* 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 <97206258+devramnage@users.noreply.github.com>
  • Loading branch information
MrRefactoring and devramnage authored Oct 29, 2023
1 parent 6ca7678 commit fd509ea
Show file tree
Hide file tree
Showing 6 changed files with 1,514 additions and 1,473 deletions.
60 changes: 48 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,63 @@ on: push

jobs:
build:
name: Build
runs-on: self-hosted
strategy:
max-parallel: 1
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Create .env file
- name: Installing dependencies
run: npm ci
- name: Building sources
run: npm run build

lint:
name: Lint Code
needs: build
runs-on: self-hosted
strategy:
matrix:
node-version: [20.x]
steps:
- name: Linting
run: npm run lint
env:
CI: true

test_unit:
name: Unit Tests
needs: build
runs-on: self-hosted
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- 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
- run: npm run build
- run: npm run test:unit
- run: npm run test:e2e
- run: npm run lint
env:
CI: true
- name: Running integration tests
run: npm run test:integration
97 changes: 89 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,106 @@ name: NPM publish
on: workflow_dispatch

jobs:
publish:
build:
name: Build
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/checkout@v4
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
node-version: 18
- name: Installing dependencies
run: npm ci
- name: Create .env file
- name: Building sources
run: npm run build

lint:
name: Lint Code
needs: build
runs-on: self-hosted
steps:
- name: Linting
run: npm run lint
env:
CI: true

test_unit:
name: Unit Tests
needs: build
runs-on: self-hosted
steps:
- 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

publish:
name: Package publish
needs:
- test_integration
runs-on: self-hosted
steps:
- name: Publishing
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-docs:
name: Docs publish
needs:
- publish
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Generate docs
run: npm run doc

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

- name: Checkout docs branch
uses: actions/checkout@v4
with:
ref: docs
clean: false

- name: Copy docs to root
run: |
cp -r docs/* .
- name: Commit and push docs
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add .
git commit -m "Update documentation for version v${{ steps.pkg.outputs.version }}"
git push
Loading

0 comments on commit fd509ea

Please sign in to comment.