Skip to content

Commit

Permalink
ci: Clean up CI workflow (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Henning Muszynski <[email protected]>
  • Loading branch information
henningmu and henningmu authored May 25, 2023
1 parent 0525e98 commit 9cde2ae
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 32 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check-pull-request-health.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check Pull Request Health

on:
pull_request:
types:
- opened
- synchronize

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]

timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Lint the codebase
run: npm run lint
env:
CI: true

- name: Test the codebase
run: npm run test
env:
CI: true

- name: Build the codebase
run: npm run build
25 changes: 0 additions & 25 deletions .github/workflows/nodejs.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,32 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Read Node.js version from '.nvmrc'
id: nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Setup Node
uses: actions/setup-node@v1
- name: Setup Node.js ${{ steps.nvmrc.outputs.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Lint
- name: Lint the codebase
run: npm run lint
env:
CI: true

- name: Build
- name: Build the codebase
run: npm run build

- name: Publish to GitHub Package Registry
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
Expand All @@ -44,7 +45,7 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish to npm registry
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
Expand Down

0 comments on commit 9cde2ae

Please sign in to comment.