-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace travis to Github Actions (#74)
- Loading branch information
Showing
4 changed files
with
71 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |