From de4564ec9cba60b33845f36d722ba37a4218e2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Wed, 30 Oct 2019 15:01:05 +0000 Subject: [PATCH] Switch to GitHub Actions for CI --- .github/workflows/server.yml | 28 ++++++++++++++++++++++++ .travis.yml | 41 ------------------------------------ README.md | 2 +- 3 files changed, 29 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/server.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml new file mode 100644 index 0000000..ba3bb10 --- /dev/null +++ b/.github/workflows/server.yml @@ -0,0 +1,28 @@ +name: server + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Test with server-configs-test + uses: h5bp/server-configs-test@feat/gha-v2 + 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@feat/gha-v2 + 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 69698a6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -# https://docs.travis-ci.com/ - -language: minimal - -services: - - docker - -addons: - hosts: - - server.localhost - - www-server.localhost - - www.server.localhost - - secure.server.localhost - - www.secure.server.localhost - apt: - packages: - - docker-ce - -install: - - curl -sSL https://github.com/h5bp/server-configs-test/releases/download/1.2.1/server-configs-test.tar.gz | tar -xz -C test/ - -before_script: - - docker pull nginx - - | - docker run -d -p 80:80 -p 443:443 --name server \ - -v $TRAVIS_BUILD_DIR/test/fixtures:/var/www/server.localhost \ - -v $TRAVIS_BUILD_DIR/test/vhosts:/etc/nginx/conf.d \ - -v $TRAVIS_BUILD_DIR/test/certs:/etc/nginx/certs \ - -v $TRAVIS_BUILD_DIR/h5bp:/etc/nginx/h5bp \ - -v $TRAVIS_BUILD_DIR/nginx.conf:/etc/nginx/nginx.conf \ - -v $TRAVIS_BUILD_DIR/mime.types:/etc/nginx/mime.types \ - nginx - -script: - - ./test/bin/k6 run test/lib/index.js -e TESTS=basic-file-access:caching:cache-busting:custom-errors:forbidden-files:precompressed-files-gzip:rewrites:ssl - -after_success: ./test/bin/k6 run test/lib/benchmark.js - -after_failure: - - docker ps -a - - docker logs server diff --git a/README.md b/README.md index 3a917f6..8ab2ec9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [Nginx Server Configs](https://github.com/h5bp/server-configs-nginx) -[![Build Status](https://img.shields.io/travis/h5bp/server-configs-nginx/master.svg)](https://travis-ci.org/h5bp/server-configs-nginx) +[![Test](https://github.com/h5bp/server-configs-nginx/workflows/server/badge.svg)](https://github.com/h5bp/server-configs-nginx/actions?query=workflow%3Aserver) **Nginx Server Configs** is a collection of configuration snippets that can help your server improve the web site's performance and security, while also