Skip to content

Commit

Permalink
ci: migrate to workflows (#339)
Browse files Browse the repository at this point in the history
* moving to workflow

* try this

* try this

* try using @3
  • Loading branch information
gurgunday authored Nov 5, 2023
1 parent 58cb4d6 commit c071191
Showing 1 changed file with 5 additions and 84 deletions.
89 changes: 5 additions & 84 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: CI

on:
push:
branches:
- main
- master
- next
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
Expand All @@ -16,85 +11,11 @@ on:
- '*.md'

jobs:
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@v4
with:
persist-credentials: false

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

linter:
name: Lint Code
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: npm i --ignore-scripts

- name: Lint code
run: npm run lint

test:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
node-version: [14, 16, 18, 20]
services:
redis:
image: redis
ports:
- '6379:6379'
options: '--entrypoint redis-server'
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
persist-credentials: false

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

- name: Install dependencies
run: npm i --ignore-scripts

- name: Run tests
run: npm test

automerge:
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
pull-requests: write
uses: fastify/workflows/.github/workflows/plugins-ci-redis.yml@v3
with:
license-check: true
lint: true

0 comments on commit c071191

Please sign in to comment.