1
0
Fork 0
mirror of https://github.com/actions/setup-java synced 2024-11-14 09:32:40 +00:00
setup-java/.github/workflows/workflow.yml
2020-02-11 19:38:16 -05:00

85 lines
2.2 KiB
YAML

name: Main workflow
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
run: npm install
- name: Lint
run: npm run format-check
- name: npm test
run: npm test
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- 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
uses: ./
with:
java-version: 13.0.2
- name: Verify Java 13
if: runner.os != 'windows'
run: __tests__/verify-java.sh 13.0.2
- name: Verify Java 13 (Windows)
if: runner.os == 'windows'
run: __tests__/verify-java.ps1 13.0.2
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
uses: ./
with:
java-version: 13.0.2
- name: Verify Java 13
run: __tests__/verify-java.sh 13.0.2
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
uses: ./
with:
java-version: 13.0.2
- name: Verify Java 13
run: __tests__/verify-java.sh 13.0.2