Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 0 additions & 146 deletions .circleci/config.yml

This file was deleted.

176 changes: 176 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
name: Build and Test

on:
release:
types: [published]
pull_request:

jobs:
prepare:
runs-on: ubuntu-latest

steps:
- name: Github Info
run: |
echo "GITHUB_ACTION: $GITHUB_ACTION"
echo "GITHUB_ACTOR: $GITHUB_ACTOR"
echo "GITHUB_REF: $GITHUB_REF"
echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF"
echo "GITHUB_BASE_REF: $GITHUB_BASE_REF"
echo "github.event_name: ${{ github.event_name }}"
cat $GITHUB_EVENT_PATH

- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: "14.19.3"

- uses: actions/checkout@v2

- name: Versions
run: |
npm --versions
node -v
git version

- name: check package-lock
run: |
npx package-lock-check

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
with:
path: ./node_modules
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('./package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: npm install
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm install

- name: Prepare workspace
run: |
tar czf /tmp/workspace.tar.gz .

- uses: actions/upload-artifact@v2
with:
name: workspace
path: /tmp/workspace.tar.gz

lint:
runs-on: ubuntu-latest
needs: prepare

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: "14.19.3"

- uses: actions/download-artifact@v2
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Lint TypeScript Code
run: npm run lint

test:
runs-on: ubuntu-latest
needs: prepare

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: "14.19.3"

- uses: actions/download-artifact@v2
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Test TypeScript Code
run: npm run unit-tests

build:
runs-on: ubuntu-latest
needs:
- lint
- test

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: "14.19.3"

- uses: actions/download-artifact@v2
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Compile TypeScript into JavaScript
run: npm run compile

- name: Prepare workspace
run: |
tar czf /tmp/workspace.tar.gz .

- uses: actions/upload-artifact@v2
with:
name: workspace
path: /tmp/workspace.tar.gz

publish:
runs-on: ubuntu-latest
if: github.event_name == 'release' || github.event_name == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
needs: build

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: "14.19.3"

- uses: actions/download-artifact@v2
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Authenticate with registry
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc

- name: Publish package
run: |
if [[ '${{ github.event_name }}' = 'release' ]]; then
npm publish --tag latest
else
# Add build number to the end of the version
npm version --no-git-tag-version "$(node -p "require('./package.json').version").${{ github.event.number }}"

GIT_BRANCH="${GITHUB_REF#*heads/}"
if [[ $GIT_BRANCH == 'alpha' ]]; then
npm run go-publish-alpha
else
npm run go-publish-beta
fi;
fi;
61 changes: 61 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Code scanning - action"

on:
push:
branches: [master, alpha]
pull_request:
branches: [master, alpha]
# schedule:
# β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0 - 59)
# β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0 - 23)
# β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the month (1 - 31)
# β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1 - 12 or JAN-DEC)
# β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the week (0 - 6 or SUN-SAT)
# β”‚ β”‚ β”‚ β”‚ β”‚
# β”‚ β”‚ β”‚ β”‚ β”‚
# β”‚ β”‚ β”‚ β”‚ β”‚
# * * * * *
# - cron: '30 1 * * 0'

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
# actions: read
# contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2