Skip to content

Commit

Permalink
ci: move to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Jan 22, 2023
1 parent 528e4e0 commit 607b12a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 19 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
- push
- pull_request

jobs:
cache-and-install:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Format
run: pnpm format:check

- name: Lint
run: pnpm format:check

- name: Tests
run: pnpm test

- name: Coverage
uses: codecov/codecov-action@v3
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"clean": "rimraf coverage dist es lib",
"prepublishOnly": "run-s build",
"test": "vitest run --coverage",
"lint": "xo"
"lint": "xo",
"prepare": "husky install"
},
"files": [
"dist"
Expand Down Expand Up @@ -41,7 +42,7 @@
"@vitest/coverage-c8": "0.26.2",
"eslint-config-unicorn-camelcase": "0.1.1",
"flux-standard-action": "2.1.2",
"husky": "8.0.2",
"husky": "^8.0.0",
"lint-staged": "13.1.0",
"npm-run-all": "4.1.5",
"prettier": "2.8.1",
Expand Down

0 comments on commit 607b12a

Please sign in to comment.