server-configs-nginx/.github/workflows/server.yml

42 lines
1.3 KiB
YAML

# https://help.github.com/en/actions
name: server
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Check configuration
uses: docker://nginx:latest
with:
entrypoint: nginx
args: -c /github/workspace/nginx.conf -t
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Test with server-configs-test
uses: h5bp/server-configs-test@3.3.0
with:
command: test
server: nginx
root-path: /var/www/server.localhost
certs-path: /etc/nginx/certs
configs-volumes: test/vhosts:/etc/nginx/conf.d;h5bp:/etc/nginx/h5bp;nginx.conf:/etc/nginx/nginx.conf;mime.types:/etc/nginx/mime.types
tests: basic-file-access;caching;cache-busting;custom-errors;forbidden-files;precompressed-files-gzip;rewrites;ssl
- name: Benchmark
uses: h5bp/server-configs-test@3.3.0
with:
command: benchmark
server: nginx
root-path: /var/www/server.localhost
certs-path: /etc/nginx/certs
configs-volumes: test/vhosts:/etc/nginx/conf.d;h5bp:/etc/nginx/h5bp;nginx.conf:/etc/nginx/nginx.conf;mime.types:/etc/nginx/mime.types