Skip to content

Commit

Permalink
Add ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven committed Sep 9, 2024
1 parent b3ff26d commit 0eac56f
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 13 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI
on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- id: lint
uses: buildjet/cache@v4
with:
path: .next
key: $${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-lint
restore-keys: $${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
- uses: pnpm/action-setup@v4
- uses: buildjet/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm lint:strict --cache-dir=.next

build:
name: Build
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- id: build
uses: buildjet/cache@v4
with:
path: .next
key: ${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built
restore-keys: ${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
- uses: pnpm/action-setup@v4
- uses: buildjet/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build --cache-dir=.next

# test:
# name: test
# runs-on: buildjet-4vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v4
# - id: tested
# uses: buildjet/cache@v4
# with:
# path: .next
# key: ${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-test
# restore-keys: ${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
# - uses: pnpm/action-setup@v4
# - uses: buildjet/setup-node@v4
# with:
# node-version: "22"
# cache: "pnpm"
# - run: pnpm install --frozen-lockfile
# - run: pnpm test --cache-dir=.next
13 changes: 0 additions & 13 deletions eslintinit.config.js

This file was deleted.

0 comments on commit 0eac56f

Please sign in to comment.