Skip to content

Commit 14904a0

Browse files
committed
Setup GitHub CI
1 parent 2eb81f5 commit 14904a0

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Setup runner"
2+
description: "It setups node, install pnpm packages and caches them"
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install Node.js
7+
uses: actions/setup-node@v4
8+
with:
9+
node-version: 22
10+
- uses: pnpm/action-setup@v4
11+
name: Install pnpm
12+
with:
13+
version: 10.2.x
14+
id: pnpm-install
15+
- name: Get pnpm store directory
16+
id: pnpm-cache
17+
shell: bash
18+
run: |
19+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
20+
21+
- uses: actions/cache@v4
22+
name: Setup pnpm cache
23+
with:
24+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
25+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
26+
restore-keys: |
27+
${{ runner.os }}-pnpm-store-
28+
29+
- name: Install dependencies
30+
shell: bash
31+
run: pnpm install --frozen-lockfile

.github/workflows/check.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Astro check
2+
on:
3+
push:
4+
branches:
5+
- "**"
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
env:
14+
CI_RUN: true
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ./.github/actions/prepare-runner
18+
- run: pnpm check

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Run linters
2+
on:
3+
push:
4+
branches:
5+
- "**"
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
env:
14+
CI_RUN: true
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ./.github/actions/prepare-runner
18+
- run: pnpm lint

0 commit comments

Comments
 (0)