1
0
Fork 0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-04-26 03:45:26 +02:00

refactor(ci): ♻️ refactor makefile and modify its usage on CI

This commit is contained in:
Kevin Marilleau 2021-03-19 16:44:50 +01:00 committed by Nicolas Duchon
parent 1591fd7968
commit 39f822dd8b
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7
3 changed files with 16 additions and 14 deletions

View File

@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: true
matrix:
docker_image: [alpine, debian]
base_docker_image: [alpine, debian]
steps:
- uses: actions/checkout@v2
@ -27,7 +27,11 @@ jobs:
working-directory: test/requirements
- name: Build Docker web server image
run: make update-dependencies
run: make build-webserver
- name: Build Docker nginx proxy test image
run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}
- name: Run tests
run: make test-${{ matrix.docker_image }}
run: pytest
working-directory: test

View File

@ -2,15 +2,19 @@
.PHONY : test-debian test-alpine test
update-dependencies:
test/requirements/build.sh
build-webserver:
docker build -t web test/requirements/web
test-debian: update-dependencies
build-nginx-proxy-test-debian:
docker build -t nginxproxy/nginx-proxy:test .
build-nginx-proxy-test-alpine:
docker build -f Dockerfile.alpine -t nginxproxy/nginx-proxy:test .
test-debian: build-webserver build-nginx-proxy-test-debian
test/pytest.sh
test-alpine: update-dependencies
docker build -f Dockerfile.alpine -t nginxproxy/nginx-proxy:test .
test-alpine: build-webserver build-nginx-proxy-test-alpine
test/pytest.sh
test: test-debian test-alpine

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker build -t web $DIR/web