Skip to content

Commit

Permalink
changes after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw committed Mar 1, 2024
1 parent 44369a8 commit e7c359e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release on @dev tag in npm
run: pnpm exec changeset version --snapshot pr && pnpm publish --tag dev --no-git-checks
run: pnpm publish:ci-dev
- name: Get new package version
run: |
VERSION=$(cat package.json | jq -r '.version')
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: QA
on: [pull_request]
jobs:
lint-test:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -12,7 +12,19 @@ jobs:
- args: [--frozen-lockfile]
- name: Check linters
run: pnpm lint
- name: Test
- name: Check types
run: pnpm check-types

test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
run_install: |
- args: [--frozen-lockfile]
- name: Run tests
run: pnpm test:ci
- name: Generate coverage report
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
Expand All @@ -27,3 +39,15 @@ jobs:
with:
recreate: true
path: code-coverage-results.md

build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
run_install: |
- args: [--frozen-lockfile]
- name: Build package
run: pnpm build
5 changes: 1 addition & 4 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Setup PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
Expand All @@ -27,6 +25,5 @@ jobs:
commit: Release to npm
publish: "pnpm publish:ci"
env:
# Use private access token so Github can trigger another workflow from this one
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run test:ci
pnpm check-types && pnpm test:ci
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"test": "vitest",
"test:ci": "CI=true vitest --coverage --silent",
"prepare": "husky install",
"lint": "tsc --noEmit && prettier --loglevel warn --write . && eslint --fix .",
"check-types": "tsc --noEmit",
"lint": "prettier --loglevel warn --write . && eslint --fix .",
"copy-readme": "cp README.md dist/README.md",
"publish:ci": "pnpm publish --dry-run && pnpm exec changeset tag && git push --follow-tags",
"publish:ci-prod": "pnpm publish --dry-run",
"publish:ci-dev": "pnpm publish --dry-run --tag dev",
"lint-staged": "lint-staged"
},
"keywords": [],
Expand Down

0 comments on commit e7c359e

Please sign in to comment.