diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..4c55f91 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,63 @@ +name: ci + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: check-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Typecheck + run: npm -w packages/auth run typecheck + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Test (unit) + run: npm run test:unit diff --git a/examples/next-admin-auth/package.json b/examples/next-admin-auth/package.json index fad9c98..99fca28 100644 --- a/examples/next-admin-auth/package.json +++ b/examples/next-admin-auth/package.json @@ -5,7 +5,7 @@ "dev": "next dev -p 3017", "build": "next build", "start": "next start -p 3017", - "auth:ensure": "npm exec playwright-kit -- auth ensure --dotenv", + "auth:ensure": "playwright-kit auth ensure --dotenv", "pretest": "npm run auth:ensure", "test": "playwright test" }, diff --git a/examples/next-admin-auth/playwright.config.ts b/examples/next-admin-auth/playwright.config.ts index fa6fa4a..84381b4 100644 --- a/examples/next-admin-auth/playwright.config.ts +++ b/examples/next-admin-auth/playwright.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ use: { baseURL: "http://127.0.0.1:3017", actionTimeout: 10_000, - navigationTimeout: 30_000, + navigationTimeout: 60_000, }, webServer: { command: "npm run dev",