-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated lockfile Replaced ci with i npm/cli#558 Reverted to npm 6 Cannot ugprade to npm 7 due to Node 14 shipping with npm 6 Fixed scripts
- Loading branch information
1 parent
2454772
commit 91adae4
Showing
9 changed files
with
2,543 additions
and
1,994 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: cd | ||
on: | ||
push: | ||
branches: main | ||
tags: '*' | ||
|
||
jobs: | ||
ci: | ||
name: Install, Lint & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install Node | ||
uses: actions/setup-node@v2.1.3 | ||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: node- | ||
- name: Install packages | ||
run: npm i | ||
- name: Lint | ||
run: npm run lint | ||
- name: Unit Test | ||
run: npm run test:unit | ||
- name: Integration Test | ||
run: npm run test:integration | ||
|
||
publish-npm: | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: node- | ||
- name: Install packages | ||
run: npm i | ||
- name: Publish (NPM) | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
publish-gpr: | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: https://npm.pkg.github.com/ | ||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: node- | ||
- name: Install packages | ||
run: npm i | ||
- name: Publish (GitHub) | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,44 +1,26 @@ | ||
name: ci | ||
on: [push, pull_request] | ||
env: | ||
WEBHOOK_URL: ${{secrets.WEBHOOK_URL}} | ||
|
||
jobs: | ||
ci: | ||
name: Lint & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Cache node_modules | ||
uses: actions/cache@v2.1.3 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Node | ||
uses: actions/setup-node@v2.1.3 | ||
- name: Install Packages | ||
run: yarn --frozen-lockfile | ||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: node- | ||
- name: Install packages | ||
run: npm i | ||
- name: Lint | ||
run: yarn lint | ||
run: npm run lint | ||
- name: Unit Test | ||
run: yarn test:unit | ||
run: npm run test:unit | ||
- name: Integration Test | ||
run: yarn test:integration | ||
- name: On success | ||
if: ${{success()}} | ||
run: | | ||
wget https://raw.githubusercontent.com/chronoDave/user-scripts/master/webhooks/discord_github.sh | ||
chmod +x discord_github.sh | ||
./discord_github.sh success | ||
- name: On error | ||
if: ${{failure()}} | ||
run: | | ||
wget https://raw.githubusercontent.com/chronoDave/user-scripts/master/webhooks/discord_github.sh | ||
chmod +x discord_github.sh | ||
./discord_github.sh failure | ||
run: npm run test:integration |
Oops, something went wrong.