-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #793 from object1037/object1037-patch-1
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
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,56 @@ | ||
name: build_and_check | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build_and_check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 21.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- 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@v4 | ||
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: Setup env file | ||
shell: bash | ||
run: | | ||
touch .dev.vars | ||
echo GITHUB_CLIENT_ID="123456789" >> .dev.vars | ||
echo GITHUB_CLIENT_SECRET="123456789" >> .dev.vars | ||
echo CALLBACK_URL="123456789" >> .dev.vars | ||
echo SESSION_SECRET="123456789" >> .dev.vars | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- name: Run tsc | ||
run: pnpm typecheck | ||
- name: Run ESLint | ||
run: pnpm lint | ||
- name: Run Prettier | ||
run: pnpm fmt | ||
- name: Cleanup env file | ||
run: rm .dev.vars |