Skip to content

Commit

Permalink
ci: run ci on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco committed Dec 4, 2023
1 parent fafa93a commit fa68083
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
38 changes: 4 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,16 @@ name: Main
on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
name: Test on Node.js ${{ matrix.node }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node }}

- name: Install
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm test

release:
needs: test
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2.1.4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 12

- name: Install
run: npm ci

node-version: 16
- run: npm ci
- name: Run semantic-release
uses: cycjimmy/semantic-release-action@v2
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 16
- 14
- 12
name: Test on Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run lint
- run: npm run test

0 comments on commit fa68083

Please sign in to comment.