Skip to content

Commit

Permalink
ci: simplify Testing choses job (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored May 24, 2022
1 parent da3ed40 commit cbd96fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,19 @@ jobs:

steps:
- uses: actions/checkout@v3

- run: |
git fetch --no-tags --unshallow origin HEAD main
with:
fetch-depth: 2

- uses: actions/setup-node@v3
with:
node-version: 14

- name: "Check that the cache files are consistent with their remote sources"
run: |
if [[ $(git diff --name-only "$(git merge-base origin/"$TARGET_BRANCH" HEAD)" HEAD -- .yarn/cache | wc -l) -gt 0 ]]; then
git diff --exit-code --quiet HEAD^ -- .yarn/cache || \
corepack yarn --immutable --immutable-cache --check-cache
fi
shell: bash
if: |
github.event.pull_request != ''
env:
TARGET_BRANCH: ${{github.event.pull_request.base.ref}}
- name: "Check for type errors"
run: corepack yarn typecheck
Expand Down Expand Up @@ -60,5 +55,5 @@ jobs:

- run: corepack yarn install --immutable
- run: corepack yarn build # We need the stubs to run the tests
- run: corepack yarn eslint
- run: corepack yarn jest
- run: corepack yarn lint
- run: corepack yarn test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"scripts": {
"build": "rm -rf dist shims && webpack && ts-node ./mkshims.ts",
"corepack": "ts-node ./sources/_entryPoint.ts",
"lint": "yarn eslint",
"prepack": "yarn build",
"postpack": "rm -rf dist shims",
"typecheck": "tsc --noEmit",
Expand Down

0 comments on commit cbd96fe

Please sign in to comment.