Skip to content

Move CI to GitHub Actions #4

Move CI to GitHub Actions

Move CI to GitHub Actions #4

Workflow file for this run

# DO NOT EDIT
# This is a generated file by the `rake build_matrix:github:generate` task.
# See `build_matrix.yml` for the build matrix.
# Generate this file with `rake build_matrix:github:generate`.
---
name: Node.js package CI
'on':
push:
branches:
- main
- develop
pull_request:
types:
- opened
- reopened
- synchronize
schedule:
- cron: 0 0 * * 1-5
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: "${{ !contains(github.ref, 'main')}}"
env:
RUNNING_IN_CI: 'true'
NODE_ENV: test
_PACKAGE_CACHE: v3
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Validate CI setup
run: rake build_matrix:github:validate
lint-git:
name: Git linter (Lintje)
needs: validation
runs-on: ubuntu-latest
if: "${{ github.event_name != 'schedule' }}"
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Git linter
uses: lintje/[email protected]
lint-ruby:
name: Ruby linter (RuboCop)
needs: validation
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop
lint-js:
name: JavaScript linter (Prettier)
needs: validation
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: tmp/mono/bin/mono bootstrap
- name: Node.js Lint (Prettier)
run: npm run lint
integration-tests:
name: Integration tests (${{matrix.name}})
needs: validation
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Express + Redis
test-app: express-redis
- name: Express + Knex.js
test-app: express-knex
- name: Koa + MySQL
test-app: koa-mysql
- name: Koa + Mongo
test-app: koa-mongo
- name: Express + Mongoose
test-app: express-mongoose
- name: Express + Postgres
test-app: express-postgres
- name: Express + Apollo
test-app: express-apollo
- name: Express + Yoga
test-app: express-yoga
- name: Express + Prisma + Postgres
test-app: express-prisma-postgres
- name: Express + Prisma + Mongo
test-app: express-prisma-mongo
- name: Next.js
test-app: nextjs
- name: Nest.js
test-app: nestjs
- name: Fastify
test-app: fastify
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Run integration tests
run: script/integration_test_app ${{matrix.test-app}}
build_24:
name: Node.js 24 - Build

Check failure on line 121 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Node.js package CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 121, Col: 5): Required property is missing: runs-on .github/workflows/ci.yml (Line: 142, Col: 5): Required property is missing: runs-on
needs: validation
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install dependencies
run: tmp/mono/bin/mono bootstrap --ci
- name: Build package
run: tmp/mono/bin/mono build
- name: Check install report
run: 'cat ext/install.report; cat ext/install.report | grep ''"status": "success"'''
test_24_unit:
name: Node.js 24 - Tests
needs: build_24
env:
NODE_VERSION: '24'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Run tests
run: mono test
- name: Run tests for install failure
run: npm run test:failure
test_24_extra_diagnose:
name: Node.js 24 - Extra test - diagnose
needs: build_24
env:
NODE_VERSION: '24'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Run tests
run: |
git submodule init
git submodule update
LANGUAGE=nodejs test/integration/diagnose/bin/test
build_22:
name: Node.js 22 - Build
needs: validation
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: tmp/mono/bin/mono bootstrap --ci
- name: Build package
run: tmp/mono/bin/mono build
- name: Check install report
run: 'cat ext/install.report; cat ext/install.report | grep ''"status": "success"'''
test_22_unit:
name: Node.js 22 - Tests
needs: build_22
env:
NODE_VERSION: '22'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Run tests
run: mono test
- name: Run tests for install failure
run: npm run test:failure
test_22_extra_diagnose:
name: Node.js 22 - Extra test - diagnose
needs: build_22
env:
NODE_VERSION: '22'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Run tests
run: |
git submodule init
git submodule update
LANGUAGE=nodejs test/integration/diagnose/bin/test
build_20:
name: Node.js 20 - Build
needs: validation
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: tmp/mono/bin/mono bootstrap --ci
- name: Build package
run: tmp/mono/bin/mono build
- name: Check install report
run: 'cat ext/install.report; cat ext/install.report | grep ''"status": "success"'''
test_20_unit:
name: Node.js 20 - Tests
needs: build_20
env:
NODE_VERSION: '20'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run tests
run: mono test
- name: Run tests for install failure
run: npm run test:failure
test_20_extra_diagnose:
name: Node.js 20 - Extra test - diagnose
needs: build_20
env:
NODE_VERSION: '20'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Run tests
run: |
git submodule init
git submodule update
LANGUAGE=nodejs test/integration/diagnose/bin/test
build_18:
name: Node.js 18 - Build
needs: validation
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: tmp/mono/bin/mono bootstrap --ci
- name: Build package
run: tmp/mono/bin/mono build
- name: Check install report
run: 'cat ext/install.report; cat ext/install.report | grep ''"status": "success"'''
test_18_unit:
name: Node.js 18 - Tests
needs: build_18
env:
NODE_VERSION: '18'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout Mono
uses: actions/checkout@v4
with:
repository: appsignal/mono
path: tmp/mono
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Run tests
run: mono test
- name: Run tests for install failure
run: npm run test:failure
test_18_extra_diagnose:
name: Node.js 18 - Extra test - diagnose
needs: build_18
env:
NODE_VERSION: '18'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Run tests
run: |
git submodule init
git submodule update
LANGUAGE=nodejs test/integration/diagnose/bin/test