Skip to content

Commit

Permalink
Introduce CI/CD for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
svemat01 committed May 1, 2024
1 parent 8c5e387 commit 0ec1664
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Setup dependencies"
description: "Prepare repository and all dependencies"

runs:
using: "composite"
steps:
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'pnpm'

- name: Install dependencies
shell: bash
run: pnpm install
49 changes: 49 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Verify
on: [push, pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/setup

- name: Lint code
run: pnpm lint

build:
name: Build
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/setup

- name: Build
run: pnpm build

test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/setup

- name: Run tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: pnpm test
File renamed without changes.

0 comments on commit 0ec1664

Please sign in to comment.