2019-07-12 04:24:33 +08:00
|
|
|
name: Main workflow
|
2019-12-31 14:04:50 +08:00
|
|
|
on: [push, pull_request]
|
2019-07-12 04:24:33 +08:00
|
|
|
jobs:
|
2020-02-12 07:17:37 +08:00
|
|
|
build:
|
2019-07-12 04:24:33 +08:00
|
|
|
runs-on: ${{ matrix.operating-system }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
operating-system: [ubuntu-latest, windows-latest]
|
2019-07-26 10:59:48 +08:00
|
|
|
steps:
|
2019-07-24 01:22:25 +08:00
|
|
|
- name: Checkout
|
2020-02-12 05:21:01 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-02-12 07:17:37 +08:00
|
|
|
- name: Setup Node.js 12
|
2020-02-12 05:21:01 +08:00
|
|
|
uses: actions/setup-node@v1
|
2019-07-12 04:24:33 +08:00
|
|
|
with:
|
2020-02-12 05:21:01 +08:00
|
|
|
node-version: 12.x
|
2019-07-12 04:24:33 +08:00
|
|
|
- name: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
|
|
run: npm run format-check
|
|
|
|
- name: npm test
|
|
|
|
run: npm test
|
2020-02-12 07:17:37 +08:00
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.operating-system }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
operating-system: [ubuntu-latest, windows-latest]
|
2020-02-07 04:16:41 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2020-02-12 05:21:01 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-02-12 07:17:37 +08:00
|
|
|
- name: Clear tool cache
|
|
|
|
if: runner.os != 'windows'
|
|
|
|
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
|
|
|
|
- name: Clear tool cache (Windows)
|
|
|
|
if: runner.os == 'windows'
|
|
|
|
run: move "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
|
|
|
|
- name: Setup Java 13
|
2020-05-25 02:03:57 +08:00
|
|
|
id: setup-java
|
2020-02-12 07:17:37 +08:00
|
|
|
uses: ./
|
2020-02-07 04:16:41 +08:00
|
|
|
with:
|
2020-02-12 07:17:37 +08:00
|
|
|
java-version: 13.0.2
|
|
|
|
- name: Verify Java 13
|
|
|
|
if: runner.os != 'windows'
|
2020-05-25 02:03:57 +08:00
|
|
|
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
2020-02-12 07:17:37 +08:00
|
|
|
- name: Verify Java 13 (Windows)
|
|
|
|
if: runner.os == 'windows'
|
2020-05-25 02:03:57 +08:00
|
|
|
run: __tests__/verify-java.ps1 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
2020-02-07 04:16:41 +08:00
|
|
|
|
2020-02-12 07:17:37 +08: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 Java 13
|
2020-05-25 02:03:57 +08:00
|
|
|
id: setup-java
|
2020-02-12 07:17:37 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
java-version: 13.0.2
|
|
|
|
- name: Verify Java 13
|
2020-05-25 02:03:57 +08:00
|
|
|
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
2020-02-07 04:16:41 +08:00
|
|
|
|
2020-02-12 07:17:37 +08:00
|
|
|
test-bypass-proxy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
https_proxy: http://no-such-proxy:3128
|
|
|
|
no_proxy: github.com,static.azul.com
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Clear tool cache
|
|
|
|
run: rm -rf $RUNNER_TOOL_CACHE/*
|
|
|
|
- name: Setup Java 13
|
2020-05-25 02:03:57 +08:00
|
|
|
id: setup-java
|
2020-02-12 07:17:37 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
java-version: 13.0.2
|
|
|
|
- name: Verify Java 13
|
2020-05-25 02:03:57 +08:00
|
|
|
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|