Skip to content

Commit

Permalink
Add test to publish-auto
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Jul 20, 2023
1 parent 648a113 commit cf07c80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/publish-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ on:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- run: npm ci
# - run: npm test
- run: npm run lint
- run: npm run typecheck
uses: ./.github/workflows/test-in-parallel.yml
with:
parellelism_count: 2
test_command: npx jest
package_manager: pnpm

lint:
uses: ./.github/workflows/lint.yml

typecheck:
uses: ./.github/workflows/typecheck.yml

publish-to-npm:
needs: test
needs: [ test, lint, typecheck ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "*" # matches every branch that doesn't contain a '/'
- "*/*" # matches every branch containing a single '/'
- "**" # matches every branch
- "!main" # matches no branches
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"*.ts": "eslint --fix",
"*.js": "eslint --fix",
"*.json": "eslint --fix",
"*.graphql": "eslint --fix"
"*.graphql": "eslint --fix",
"*.yml": "eslint --fix"
},
"devDependencies": {
"@graphql-eslint/eslint-plugin": "^3.18.0",
Expand Down

0 comments on commit cf07c80

Please sign in to comment.