Skip to content

Commit

Permalink
chore: update jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothpandian committed Feb 18, 2024
1 parent 5a9dd1a commit 57fcd67
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 34 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI
on: [ push ]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [ "16.x" ]
os: [ ubuntu-latest ]

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Lint
run: pnpm lint

- name: Install Playwright browsers
run: pnpx playwright install --with-deps

- name: Test
run: pnpm test

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/tests/playwright-report/
retention-days: 30
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "turbo run build",
"dev": "turbo run dev --parallel --no-cache",
"lint": "turbo run lint",
"test": "turbo run build lint test",
"test": "turbo run build test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"ci:build": "cp README.md packages/react-sketch-canvas/ && pnpm --filter react-sketch-canvas ci:build",
"publish-packages": "pnpm test && pnpm ci:build && changeset version && changeset publish"
Expand Down

0 comments on commit 57fcd67

Please sign in to comment.