Skip to content

Fork5-rebasing

Fork5-rebasing #42

Workflow file for this run

# 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: Main CI
on:
push:
branches: [main, develop]
pull_request:
repository_dispatch:
types: [ok-to-test-command]
jobs:
trusted-build:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: setup
run: |
npm install -g npm@latest
npm i
- name: linter
run: npm run lint
- name: test
run: npm run test
from-fork-build:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: setup
run: |
npm install -g npm@latest
npm i
- name: linter
run: npm run lint
- name: test
run: npm run test