-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): granulated actions and pkg.pr.new.yml
- Loading branch information
1 parent
ef9b964
commit a22f89b
Showing
5 changed files
with
119 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Lint PR | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,28 @@ | ||
name: Run linters | ||
on: [push] | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run Lint | ||
run: pnpm run lint |
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,38 @@ | ||
name: Publish Any Commit | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '!**' | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- run: pnpx pkg-pr-new publish --compact --pnpm |
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,35 @@ | ||
name: Run E2E Tests | ||
on: [push] | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
jobs: | ||
test: | ||
name: E2E Test | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- name: Set up Cypress binary cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/Cypress | ||
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('pnpm-lock.yaml') }} | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build lib | ||
run: pnpm run build | ||
- name: Cypress run | ||
run: pnpm run test:e2e |
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