setup-java/.github/workflows/workflow.yml

89 lines
2.5 KiB
YAML
Raw Normal View History

name: Main workflow
2019-12-31 07:04:50 +01:00
on: [push, pull_request]
jobs:
2020-02-12 00:17:37 +01:00
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
2019-07-26 04:59:48 +02:00
steps:
2019-07-23 19:22:25 +02:00
- name: Checkout
2020-02-11 22:21:01 +01:00
uses: actions/checkout@v2
2020-02-12 00:17:37 +01:00
- name: Setup Node.js 12
2020-02-11 22:21:01 +01:00
uses: actions/setup-node@v1
with:
2020-02-11 22:21:01 +01:00
node-version: 12.x
- name: npm install
run: npm install
- name: Lint
run: npm run format-check
- name: npm test
run: npm test
2020-02-12 00:17:37 +01:00
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
2020-02-06 21:16:41 +01:00
steps:
- name: Checkout
2020-02-11 22:21:01 +01:00
uses: actions/checkout@v2
2020-02-12 00:17:37 +01: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
id: setup-java
2020-02-12 00:17:37 +01:00
uses: ./
2020-02-06 21:16:41 +01:00
with:
2020-02-12 00:17:37 +01:00
java-version: 13.0.2
- name: Verify Java 13
if: runner.os != 'windows'
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
2020-02-12 00:17:37 +01:00
- name: Verify Java 13 (Windows)
if: runner.os == 'windows'
run: __tests__/verify-java.ps1 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
2020-02-06 21:16:41 +01:00
2020-02-12 00:17:37 +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 Java 13
id: setup-java
2020-02-12 00:17:37 +01:00
uses: ./
with:
java-version: 13.0.2
- name: Verify Java 13
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
2020-02-06 21:16:41 +01:00
2020-02-12 00:17:37 +01: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
id: setup-java
2020-02-12 00:17:37 +01:00
uses: ./
with:
java-version: 13.0.2
- name: Verify Java 13
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"