1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00

ci: use docker-gen main on dev branch tests

This commit is contained in:
Nicolas Duchon 2021-05-04 11:03:27 +02:00
parent 9cdb8047bf
commit b6e9cdc065
No known key found for this signature in database
GPG Key ID: 91EF7BB1EECB961A
2 changed files with 22 additions and 4 deletions

View File

@ -3,13 +3,16 @@ name: Tests
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches:
- main
- dev
paths-ignore: paths-ignore:
- 'LICENSE' - 'LICENSE'
- '**.md' - '**.md'
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'LICENSE' - 'LICENSE'
- '**.md' - '**.md'
jobs: jobs:
unit: unit:
@ -39,6 +42,15 @@ jobs:
- name: Build Docker nginx proxy test image - name: Build Docker nginx proxy test image
run: make build-nginx-proxy-test-${{ matrix.base_docker_image }} run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}
if: |
( github.event_name == 'push' && github.ref != 'refs/heads/dev' ) ||
( github.event_name == 'pull_request' && github.base_ref != 'dev' )
- name: Build Docker nginx proxy dev test image
run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}-dev
if: |
( github.event_name == 'push' && github.ref == 'refs/heads/dev' ) ||
( github.event_name == 'pull_request' && github.base_ref == 'dev' )
- name: Run tests - name: Run tests
run: pytest run: pytest

View File

@ -11,6 +11,12 @@ build-nginx-proxy-test-debian:
build-nginx-proxy-test-alpine: build-nginx-proxy-test-alpine:
docker build --build-arg NGINX_PROXY_VERSION="test" -f Dockerfile.alpine -t nginxproxy/nginx-proxy:test . docker build --build-arg NGINX_PROXY_VERSION="test" -f Dockerfile.alpine -t nginxproxy/nginx-proxy:test .
build-nginx-proxy-test-debian-dev:
docker build --build-arg DOCKER_GEN_VERSION=main -t nginxproxy/nginx-proxy:test .
build-nginx-proxy-test-alpine-dev:
docker build -f Dockerfile.alpine --build-arg DOCKER_GEN_VERSION=main -t nginxproxy/nginx-proxy:test .
test-debian: build-webserver build-nginx-proxy-test-debian test-debian: build-webserver build-nginx-proxy-test-debian
test/pytest.sh test/pytest.sh