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

63 lines
1.4 KiB
YAML
Raw Normal View History

name: Main workflow
2019-12-31 07:04:50 +01:00
on: [push, pull_request]
jobs:
run:
name: Run
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
uses: actions/checkout@master
- name: Set Node.js 10.x
2019-07-16 20:24:29 +02:00
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
2020-02-06 21:16:41 +01:00
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
- name: Check proxy logs
run: |
docker cp ${{ job.services.squid.id }}:/var/log/squid/access.log access.log
cat access.log