Skip to content

Commit

Permalink
Replace travis to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweak committed Apr 29, 2021
1 parent 0c89772 commit defda64
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 23 deletions.
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, pull_request]

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

0 comments on commit defda64

Please sign in to comment.