Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace travis to GHA #74

Merged
merged 1 commit into from
Apr 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/non-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build container and validate lint/tests

on: [push]

jobs:
checkout-code-and-validate:
name: Checkout code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Build the stack
run: docker network create your_network || true
- name: Prepare the stack
run: cp Dockerfile-dev Dockerfile && cp docker-compose.yml.test docker-compose.yml
- name: Build the stack
run: docker-compose up -d --build --force-recreate --remove-orphans
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
- name: Test
run: docker-compose exec -T souin go test -v ./...
validate-prod-container-building:
needs: checkout-code-and-validate
name: Validate that the container build for prod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the stack
run: docker network create your_network || true
- name: Prepare the stack
run: cp Dockerfile-prod Dockerfile && cp docker-compose.yml.prod docker-compose.yml
- name: Build the stack
run: docker-compose up -d --build --force-recreate --remove-orphans
- name: Souin container healthceck
run: docker-compose exec -T souin ls
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
generate-binary:
name: Generate binary
needs: validate-container-building
runs-on: ubuntu-latest
steps:
-
Expand Down Expand Up @@ -41,6 +42,7 @@ jobs:
darkweak/souin:${{ env.RELEASE_VERSION }}
generate-artifacts:
name: Generate cross-platform builds
needs: validate-container-building
runs-on: ubuntu-latest
steps:
-
Expand Down
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

30 changes: 30 additions & 0 deletions docker-compose.yml.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: '3.4'

x-networks: &networks
networks:
- your_network

services:
souin:
build:
context: .
target: souin
ports:
- 80:80
- 443:443
environment:
GOPATH: /app
volumes:
- ./configuration/configuration.yml:/configuration.yml
<<: *networks

olric:
build:
context: ./olric
dockerfile: Dockerfile-olric
target: olric
restart: on-failure
<<: *networks
networks:
your_network:
external: true