Skip to content

Upgrade node engine to >=18 & @types/node to ^18.19.14 #371

Upgrade node engine to >=18 & @types/node to ^18.19.14

Upgrade node engine to >=18 & @types/node to ^18.19.14 #371

Workflow file for this run

name: CI
on: pull_request
jobs:
test:
runs-on: ubuntu-20.04
steps:
# Check out, and set up the node/ruby infra
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
# Get local dependencies & test
- run: yarn install
- run: yarn build
- run: yarn test
# Validate related tooling
- run: yarn declarations
- run: yarn tsc --esModuleInterop distribution/danger.d.ts
- run: rm -rf node_modules/@types/babel-*
- run: rm -rf node_modules/@types/babylon
# Not many Flow users nowadays, so this probably is worth dropping
# if it becomes an issue.
- run: echo "Testing Flow definition file"
- run: yarn build:flow-types
- run: echo "Running built Danger"
- run: node distribution/commands/danger-ci.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: 'echo "This is only for Integration tests on two blank projects"'
- run: |
mkdir danger_blank_test
cd danger_blank_test
yarn init --yes
yarn add file:..
echo "warn('I warned you')" > dangerfile.js
echo "Testing a blank Dangerfile on an empty project"
DEBUG="*" yarn danger run --text-only
cd ..
rm -rf danger_blank_test
name: "Make a CRA"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
npm install -g create-react-app
create-react-app danger_babel_test
cd danger_babel_test
yarn add file:..
echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
echo "Testing a blank Dangerfile on a babel CRA project"
DEBUG="*" yarn danger ci --text-only
cd ..
rm -rf danger_babel_test
name: "Make a small babel app"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}