removed idempotency #125
Workflow file for this run
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
name: ci | |
on: | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '**' | |
- '!website/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Run Gosec Security Scanner | |
uses: securego/gosec@master | |
with: | |
args: ./api ./vault ./logger | |
- name: Check code formatting | |
run: | | |
if [ -n "$(gofmt -l .)" ]; then echo "Go code is not properly formatted:"; gofmt -d .; exit 1; fi | |
# The below is a hack because the golangci-lint-action doesn't support go.work yet: https://github.com/golangci/golangci-lint/issues/2654 | |
- name: Run Go linter on vault | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.1 | |
working-directory: vault | |
- name: Run Go linter on api | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
skip-pkg-cache: true | |
version: v1.54.1 | |
working-directory: api | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Run tests | |
uses: isbang/compose-action@v1.5.1 | |
with: | |
compose-file: "./docker-compose.ci.yml" | |
up-flags: "--remove-orphans --abort-on-container-exit" | |
down-flags: "--volumes --remove-orphans" | |
services: | | |
postgres | |
tests | |
- name: Run simulations | |
uses: isbang/compose-action@v1.5.1 | |
with: | |
compose-file: "./docker-compose.ci.yml" | |
up-flags: "--remove-orphans --abort-on-container-exit" | |
down-flags: "--volumes --remove-orphans" | |
services: | | |
postgres | |
api | |
simulations |