EandrewJones running CI suite #714
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
run-name: ${{ github.actor }} running CI suite | |
on: | |
push: | |
branches: | |
- master | |
- test | |
pull_request: | |
branches: | |
- master | |
- test | |
jobs: | |
pre-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node v${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Format | |
run: npm run format | |
- name: Lint | |
run: npm run lint | |
- name: Check license header | |
uses: apache/skywalking-eyes/header@main | |
with: | |
log: info # optional: set the log level. The default value is `info`. | |
config: .licenserc.yaml # optional: set the config file. The default value is `.licenserc.yaml`. | |
mode: check # optional: Which mode License-Eye should be run in. Choices are `check` or `fix`. The default value is `check`. | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
# See active and security support for Node.js at https://endoflife.date/nodejs | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node v${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci # clean install | |
- name: Build | |
run: | | |
export PATH=${PATH}:`go env GOPATH`/bin | |
npm run build | |
- name: Test | |
run: npm run test | |
# TODO: add automatic release notes | |
# TODO: add cronjobs for automatically triggering new release candidates |