Skip to content

Commit

Permalink
ci!: bring into line with reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed May 31, 2022
1 parent fc8a95a commit 673d2e1
Showing 1 changed file with 41 additions and 35 deletions.
76 changes: 41 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,67 @@
name: Continuous Integration
name: CI

on:
push:
paths-ignore:
- "docs/**"
- "*.md"
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

env:
CI: true
COVERALLS: 0
- 'docs/**'
- '*.md'

jobs:
build:
dependency-review:
name: Dependency Review
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Dependency review
uses: actions/dependency-review-action@v1

test:
name: Test
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
# Maintenance and active LTS
node-version: [10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macOS-latest]
name: Node ${{ matrix.node-version }}

node-version: [14, 16, 18]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Check out repo
uses: actions/checkout@v3

- name: Use Node.js
id: setup_node
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
id: install
run: npm install --ignore-scripts
- name: Install dependencies
run: npm i --ignore-scripts

- name: Check licenses
id: license_check
run: |
npm run license-checker --if-present
# Unit and lint tests
- name: Tests
id: test
run: npm run test

- name: Typescript
id: typescript_test
run: npm run typescript --if-present
- name: Run tests
run: npm test

automerge:
needs: build
runs-on: ubuntu-latest
name: Automerge Dependabot PRs
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.user.login == 'dependabot[bot]'
needs: test
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
target: major

0 comments on commit 673d2e1

Please sign in to comment.