Skip to content

Commit

Permalink
chore: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
vtrbo committed Jul 14, 2022
1 parent 0036203 commit acd18c6
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [vtrbo]
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: pnpm

- name: Install
run: npm ci

- name: Lint
run: npm run lint

# typecheck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Install pnpm
# uses: pnpm/action-setup@v2

# - name: Set node
# uses: actions/setup-node@v3
# with:
# node-version: 16.x
# cache: pnpm

# - name: Install
# run: npm ci

# - name: Typecheck
# run: npm run typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [14.x, 16.x]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: Install
run: npm ci

- name: Build
run: npn run build

- name: Test
run: npn run test
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16.x

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ lib-cov
logs
node_modules
temp
.github

0 comments on commit acd18c6

Please sign in to comment.