mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Add scripts to help people replicate CI
This commit is contained in:
parent
d65fd5cff3
commit
6c0ba6ecd0
4 changed files with 19 additions and 6 deletions
|
@ -11,7 +11,7 @@ commands:
|
|||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
- run: yarn run build
|
||||
- run: bash -c 'yarn run build'
|
||||
jobs:
|
||||
lint:
|
||||
docker:
|
||||
|
@ -20,21 +20,19 @@ jobs:
|
|||
- run: sudo apt update
|
||||
- run: sudo apt install -qq shellcheck
|
||||
- commoncmd
|
||||
- run: bash -c 'GLOBIGNORE="node_modules" shellcheck -e2012 **/*.sh'
|
||||
- run: yarn run lint
|
||||
- run: bash -c '"$(yarn bin)/eslint" src --ext .ts'
|
||||
- run: bash -c './ci/lint.sh'
|
||||
unit:
|
||||
docker:
|
||||
- image: circleci/node:latest
|
||||
steps:
|
||||
- commoncmd
|
||||
- run: bash -c '"$(yarn bin)/jest" src'
|
||||
- run: bash -c './ci/unit.sh'
|
||||
mozilla:
|
||||
docker:
|
||||
- image: circleci/node:latest
|
||||
steps:
|
||||
- commoncmd
|
||||
- run: bash -c 'cd build; "$(yarn bin)/web-ext" lint'
|
||||
- run: bash -c 'ci/mozilla.sh'
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
|
9
ci/lint.sh
Executable file
9
ci/lint.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
cd ${0%/*}/..
|
||||
if ! [ -x "$(command -v shellcheck)" ]; then
|
||||
GLOBIGNORE="node_modules" shellcheck -e2012 **/*.sh
|
||||
else
|
||||
echo "Warning: shellcheck is not installed, skipping shell scripts"
|
||||
fi
|
||||
yarn run lint
|
||||
"$(yarn bin)/eslint" --ext .ts
|
3
ci/mozilla.sh
Executable file
3
ci/mozilla.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
cd ${0%/*}/../build
|
||||
"$(yarn bin)/web-ext" lint
|
3
ci/unit.sh
Executable file
3
ci/unit.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
cd ${0%/}
|
||||
"$(yarn bin)/jest" src
|
Loading…
Add table
Reference in a new issue