3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-23 02:29:33 +01:00
setup-node/.github/workflows/workflow.yml

82 lines
1.9 KiB
YAML
Raw Normal View History

2019-08-04 03:49:54 +02:00
name: Main workflow
2020-01-27 16:37:12 +01:00
on:
pull_request:
push:
branches:
- master
- releases/*
2019-08-04 03:49:54 +02:00
jobs:
2020-01-27 16:37:12 +01:00
build:
2019-08-04 03:49:54 +02:00
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
steps:
2020-01-27 16:37:12 +01:00
- uses: actions/checkout@v2
- name: Setup node 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm ci
- run: npm run build
- run: npm run format-check
- run: npm run pack
- run: npm test
- name: Verify no unstaged changes
if: runner.os != 'windows'
run: __tests__/verify-no-unstaged-changes.sh
2019-08-04 03:49:54 +02:00
2020-01-27 16:37:12 +01:00
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 10
uses: ./
with:
node-version: 10.x
- name: Verify node and npm
run: __tests__/verify-node.sh 10
2019-08-04 03:49:54 +02:00
2020-01-27 16:37:12 +01:00
test-proxy:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
options: --dns 127.0.0.1
services:
squid-proxy:
image: datadog/squid:latest
ports:
- 3128:3128
env:
https_proxy: http://squid-proxy:3128
steps:
- uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 10
uses: ./
with:
node-version: 10.x
- name: Verify node and npm
run: __tests__/verify-node.sh 10
2019-08-04 03:49:54 +02:00
2020-01-27 16:37:12 +01:00
test-bypass-proxy:
runs-on: ubuntu-latest
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,nodejs.org,registry.npmjs.org
steps:
- uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 10
uses: ./
with:
node-version: 10.x
- name: Verify node and npm
run: __tests__/verify-node.sh 10