Skip to content

Commit

Permalink
Introduce more granular GitHub workflows according to the new structu…
Browse files Browse the repository at this point in the history
…re of npm scripts
  • Loading branch information
adamkudrna committed Aug 2, 2023
1 parent 54ef063 commit f12e0bb
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on: [ pull_request ]

jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-20.04
strategy:
matrix:
# TODO: Add v18 back (#374) once the docs platform is migrated to a non-Gatsby solution (#373).
# node: [ 16, 18 ]
node: [ 16 ]
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Print Node.js and npm version
run: node --version && npm --version

- name: Install
run: npm ci

- name: Build
run: npm run build
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on: [ pull_request ]

jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-20.04
strategy:
matrix:
# TODO: Add v18 back (#374) once the docs platform is migrated to a non-Gatsby solution (#373).
# node: [ 16, 18 ]
node: [ 16 ]
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Print Node.js and npm version
run: node --version && npm --version

- name: Install
run: npm ci

- name: Test
run: npm run lint
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Run Tests
name: Test

on: [ pull_request ]

Expand Down Expand Up @@ -27,8 +27,5 @@ jobs:
- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

0 comments on commit f12e0bb

Please sign in to comment.