-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched from CircleCI to Github Actions
- Loading branch information
Josh Goldberg
committed
Oct 21, 2021
1 parent
3ec6caf
commit 4412eb9
Showing
36 changed files
with
681 additions
and
640 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 |
---|---|---|
@@ -1,57 +1,57 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:latest | ||
build: | ||
docker: | ||
- image: circleci/node:latest | ||
|
||
working_directory: ~/repo | ||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- dependency-cache-{{ checksum "yarn.lock" }} | ||
- dependency-cache- | ||
- run: yarn | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn run verify | ||
- persist_to_workspace: | ||
root: "." | ||
paths: | ||
- src | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- dependency-cache-{{ checksum "yarn.lock" }} | ||
- dependency-cache- | ||
- run: yarn | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn run verify | ||
- persist_to_workspace: | ||
root: "." | ||
paths: | ||
- src | ||
|
||
publish: | ||
docker: | ||
- image: circleci/node:latest | ||
publish: | ||
docker: | ||
- image: circleci/node:latest | ||
|
||
working_directory: ~/repo | ||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: "." | ||
- run: | ||
name: Add NPM auth token file | ||
command: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc | ||
- run: | ||
name: npm publish if new version | ||
command: | | ||
currentVersion=`npm show console-fail-test version` | ||
nextVersion=`node -e "console.log(require('./package.json').version)"` | ||
[ "$currentVersion" != "$nextVersion" ] && npm publish || true; | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: "." | ||
- run: | ||
name: Add NPM auth token file | ||
command: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc | ||
- run: | ||
name: npm publish if new version | ||
command: | | ||
currentVersion=`npm show console-fail-test version` | ||
nextVersion=`node -e "console.log(require('./package.json').version)"` | ||
[ "$currentVersion" != "$nextVersion" ] && npm publish || true; | ||
workflows: | ||
version: 2 | ||
build_and_end_to_end: | ||
jobs: | ||
version: 2 | ||
build_and_end_to_end: | ||
jobs: | ||
- build | ||
- publish: | ||
context: org-global | ||
requires: | ||
- build | ||
- publish: | ||
context: org-global | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: main | ||
filters: | ||
branches: | ||
only: main |
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,19 +1,19 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
extends: ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
}, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
extends: ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
}, | ||
}; |
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,17 @@ | ||
name: Publish to NPM | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Codecademy/run-on-yarn@v1 | ||
with: | ||
command: compile | ||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main |
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,16 @@ | ||
name: Push CI | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Codecademy/run-on-yarn@v1 | ||
with: | ||
command: ${{ matrix.command }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
command: ["compile", "lint"] | ||
|
||
on: push |
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,39 +1,5 @@ | ||
{ | ||
"arrowParens": "always", | ||
"parser": "typescript", | ||
"printWidth": 140, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"overrides": [ | ||
{ | ||
"files": ".*.json", | ||
"options": { | ||
"parser": "json" | ||
} | ||
}, | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"parser": "json" | ||
} | ||
}, | ||
{ | ||
"files": ".vscode/*.json", | ||
"options": { | ||
"parser": "json" | ||
} | ||
}, | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"parser": "markdown" | ||
} | ||
}, | ||
{ | ||
"files": "*.yml", | ||
"options": { | ||
"parser": "yaml" | ||
} | ||
} | ||
] | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"trailingComma": "all" | ||
} |
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,10 +1,10 @@ | ||
{ | ||
"files.exclude": { | ||
"**/*.js": { | ||
"when": "$(basename).ts" | ||
}, | ||
"**/*.d.ts": { | ||
"when": "$(basename).ts" | ||
} | ||
"files.exclude": { | ||
"**/*.js": { | ||
"when": "$(basename).ts" | ||
}, | ||
"**/*.d.ts": { | ||
"when": "$(basename).ts" | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.