-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c507d2
commit 591a3ea
Showing
1 changed file
with
13 additions
and
38 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 |
---|---|---|
@@ -1,56 +1,31 @@ | ||
name: Push checks | ||
name: Lint | ||
on: [push] | ||
jobs: | ||
Checkout: | ||
ci: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 7 | ||
environment: production | ||
steps: | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
fetch-depth: 1 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 7 # or whatever version you prefer | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
version: 9.1.3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
node-version: 20 | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Generate pnpm-lock.yaml if it doesn't exist | ||
run: | | ||
if [ ! -f pnpm-lock.yaml ]; then | ||
echo "pnpm-lock.yaml not found. Generating it..." | ||
pnpm install --lockfile-only | ||
else | ||
echo "pnpm-lock.yaml found. Proceeding with installation..." | ||
fi | ||
- name: Installing dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Tests | ||
run: pnpm test |