Skip to content

Commit

Permalink
(chore): Define github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximusHaximus committed Mar 27, 2024
1 parent 2fb063e commit b39ce51
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/_setup_env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Configure environment
name: Configure env for lint or tests
on:
workflow_call:

Expand All @@ -12,6 +12,10 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 6.32.9
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: ./.github/workflows/_setup_env.yml
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: 6.32.9
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/workflows/_setup_env.yml
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Install project dependencies
run: pnpm install
- name: Lint
run: pnpm lint
tests:
Expand All @@ -26,10 +37,20 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: 6.32.9
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/workflows/_setup_env.yml
- name: Run tests
run: pnpm test
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Install project dependencies
run: pnpm install
- name: Lint
run: pnpm lint

0 comments on commit b39ce51

Please sign in to comment.