mirror of
https://github.com/actions/setup-java.git
synced 2024-11-27 10:51:03 -05:00
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Main workflow
|
|
on: [push, pull_request]
|
|
jobs:
|
|
run:
|
|
name: Run
|
|
runs-on: ${{ matrix.operating-system }}
|
|
strategy:
|
|
matrix:
|
|
operating-system: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set Node.js 10.x
|
|
uses: actions/setup-node@master
|
|
with:
|
|
node-version: 10.x
|
|
|
|
- name: npm install
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npm run format-check
|
|
|
|
- name: npm test
|
|
run: npm test
|
|
run-with-proxy:
|
|
name: Run with proxy
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
squid:
|
|
image: dakale/squid
|
|
ports: ['3128:3128']
|
|
options: '--health-cmd "exit 0" --health-interval 3s'
|
|
env:
|
|
http_proxy: http://localhost:3128
|
|
https_proxy: http://localhost:3128
|
|
steps:
|
|
- name: Block non proxied traffic
|
|
run: |
|
|
echo "127.0.0.0 registry.npm.js nodejs.org github.com api.github.com download.java.net static.azul.com" | sudo tee -a /etc/hosts
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set Node.js 10.x
|
|
uses: actions/setup-node@master
|
|
with:
|
|
node-version: 10.x
|
|
|
|
- name: npm install
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npm run format-check
|
|
|
|
- name: npm test
|
|
run: npm test
|