This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
126 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- v1.x | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- v1.x | ||
pull_request: | ||
|
||
jobs: | ||
Linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Run ESLint | ||
uses: icrawl/action-eslint@v1 | ||
Linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Run ESLint | ||
uses: icrawl/action-eslint@v1 | ||
|
||
Testing: | ||
name: Testing - Node v${{ matrix.node_version }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node_version: [12, 14] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Test | ||
run: yarn test | ||
Testing: | ||
name: Testing - Node v${{ matrix.node_version }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node_version: [12, 14] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Test | ||
run: yarn test | ||
|
||
Building: | ||
name: Building | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Compile TypeScript | ||
uses: icrawl/action-tsc@v1 | ||
with: | ||
build: src | ||
Building: | ||
name: Building | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn --ignore-scripts --frozen-lockfile | ||
- name: Compile TypeScript | ||
uses: icrawl/action-tsc@v1 | ||
with: | ||
build: src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
name: Docgen | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
Docgen: | ||
name: Docgen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn | ||
- name: Build documentation | ||
run: yarn docs | ||
- name: Publish Docs | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
echo -e "\n# Initialise some useful variables" | ||
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
BRANCH_OR_TAG=`awk -F/ '{print $2}' <<< $GITHUB_REF` | ||
CURRENT_BRANCH=`awk -F/ '{print $NF}' <<< $GITHUB_REF` | ||
Docgen: | ||
name: Docgen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Install NodeJS v14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: Restore CI Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies | ||
run: yarn | ||
- name: Build documentation | ||
run: yarn docs | ||
- name: Publish Docs | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
run: | | ||
echo -e "\n# Initialise some useful variables" | ||
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
BRANCH_OR_TAG=`awk -F/ '{print $2}' <<< $GITHUB_REF` | ||
CURRENT_BRANCH=`awk -F/ '{print $NF}' <<< $GITHUB_REF` | ||
if [ "$BRANCH_OR_TAG" == "heads" ]; then | ||
SOURCE_TYPE="branch" | ||
else | ||
SOURCE_TYPE="tag" | ||
fi | ||
if [ "$BRANCH_OR_TAG" == "heads" ]; then | ||
SOURCE_TYPE="branch" | ||
else | ||
SOURCE_TYPE="tag" | ||
fi | ||
echo -e "\n# Checkout the repo in the target branch" | ||
TARGET_BRANCH="gh-pages" | ||
git clone $REPO out -b $TARGET_BRANCH | ||
echo -e "\n# Checkout the repo in the target branch" | ||
TARGET_BRANCH="gh-pages" | ||
git clone $REPO out -b $TARGET_BRANCH | ||
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed" | ||
rsync -vau docs/ out/ | ||
rsync -va README.md out/ | ||
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed" | ||
rsync -vau docs/ out/ | ||
rsync -va README.md out/ | ||
echo -e "\n# Commit and push" | ||
cd out | ||
git add --all . | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_EMAIL}" | ||
git commit -m "docs: api docs build for${GITHUB_SHA}" || true | ||
git push origin $TARGET_BRANCH | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | ||
GITHUB_ACTOR: NM-EEA-Y | ||
GITHUB_EMAIL: [email protected] | ||
echo -e "\n# Commit and push" | ||
cd out | ||
git add --all . | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_EMAIL}" | ||
git commit -m "docs: api docs build for${GITHUB_SHA}" || true | ||
git push origin $TARGET_BRANCH | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | ||
GITHUB_ACTOR: NM-EEA-Y | ||
GITHUB_EMAIL: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters