aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-08-11 13:29:32 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2024-08-11 13:29:32 -0700
commit7758d903c27f5cdaadaa24f8ed1965b7a6590df8 (patch)
tree2c9b13e5b9c54a150c5b5e2525d3b7bae53d472c /backend
parentc98b9a6ad588e5faca7d44eac22f95884355224f (diff)
downloadibd-trader-7758d903c27f5cdaadaa24f8ed1965b7a6590df8.tar.gz
ibd-trader-7758d903c27f5cdaadaa24f8ed1965b7a6590df8.tar.zst
ibd-trader-7758d903c27f5cdaadaa24f8ed1965b7a6590df8.zip
Set up workflows for new monorepo
Diffstat (limited to 'backend')
-rw-r--r--backend/.github/workflows/datadog.yaml37
-rw-r--r--backend/.github/workflows/docker.yaml74
-rw-r--r--backend/.github/workflows/go.yaml63
3 files changed, 0 insertions, 174 deletions
diff --git a/backend/.github/workflows/datadog.yaml b/backend/.github/workflows/datadog.yaml
deleted file mode 100644
index e7418f3..0000000
--- a/backend/.github/workflows/datadog.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-on: [push]
-
-name: Datadog Analysis
-
-jobs:
- static-analysis:
- runs-on: ubuntu-latest
- name: Datadog Static Analyzer
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Check code meets quality and security standards
- id: datadog-static-analysis
- uses: DataDog/datadog-static-analyzer-github-action@v1
- with:
- dd_api_key: ${{ secrets.DD_API_KEY }}
- dd_app_key: ${{ secrets.DD_APP_KEY }}
- dd_service: ibd-trader-backend
- dd_env: ci
- dd_site: datadoghq.com
- cpu_count: 2
-
- software-composition-analysis:
- runs-on: ubuntu-latest
- name: Datadog SBOM Generation and Upload
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Check imported libraries are secure and compliant
- id: datadog-software-composition-analysis
- uses: DataDog/datadog-sca-github-action@main
- with:
- dd_api_key: ${{ secrets.DD_API_KEY }}
- dd_app_key: ${{ secrets.DD_APP_KEY }}
- dd_service: ibd-trader-backend
- dd_env: ci
- dd_site: datadoghq.com
diff --git a/backend/.github/workflows/docker.yaml b/backend/.github/workflows/docker.yaml
deleted file mode 100644
index cf6aec9..0000000
--- a/backend/.github/workflows/docker.yaml
+++ /dev/null
@@ -1,74 +0,0 @@
-name: Docker
-
-on:
- # schedule:
- # - cron: '45 13 * * *'
- push:
- branches: [ "main" ]
- # Publish semver tags as releases.
- tags: [ 'v*.*.*' ]
- pull_request:
- branches: [ "main" ]
-
-env:
- # Use docker.io for Docker Hub if empty
- REGISTRY: ghcr.io
- # github.repository as <account>/<repo>
- IMAGE_NAME: ${{ github.repository }}
-
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- submodules: recursive
- token: ${{ secrets.PAT_TOKEN }}
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- # Set up BuildKit Docker container builder to be able to build
- # multi-platform images and export cache
- # https://github.com/docker/setup-buildx-action
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- # Login against a Docker registry except on PR
- # https://github.com/docker/login-action
- - name: Log into registry ${{ env.REGISTRY }}
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v3
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- # Extract metadata (tags, labels) for Docker
- # https://github.com/docker/metadata-action
- - name: Extract Docker metadata
- id: meta
- uses: docker/metadata-action@v5
- with:
- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
- # Build and push Docker image with Buildx (don't push on PR)
- # https://github.com/docker/build-push-action
- - name: Build and push Docker image
- id: build-and-push
- uses: docker/build-push-action@v6
- with:
- context: .
- platforms: linux/amd64,linux/arm64
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
diff --git a/backend/.github/workflows/go.yaml b/backend/.github/workflows/go.yaml
deleted file mode 100644
index 2eb8dd2..0000000
--- a/backend/.github/workflows/go.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-name: Go
-
-on:
- push:
- branches: [ "main" ]
- pull_request:
- branches: [ "main" ]
-
-permissions:
- contents: read
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- services:
- dind:
- image: docker:dind-rootless
- ports:
- - 2375:2375
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- token: ${{ secrets.PAT_TOKEN }}
- - uses: actions/setup-go@v5
- with:
- go-version: stable
- - uses: bufbuild/buf-action@v1
- with:
- setup_only: true
- - name: Install mockgen
- run: go install go.uber.org/mock/mockgen@latest
- - name: Generate
- run: go generate -v ./...
- - name: Build
- run: go build -v ./...
- - name: Test
- run: go test -v ./...
-
- lint:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- token: ${{ secrets.PAT_TOKEN }}
- - uses: actions/setup-go@v5
- with:
- go-version: stable
- - uses: bufbuild/buf-action@v1
- with:
- setup_only: true
- - name: Install mockgen
- run: go install go.uber.org/mock/mockgen@latest
- - name: Generate
- run: go generate -v ./...
- - name: golangci-lint
- uses: golangci/golangci-lint-action@v6
- with:
- version: v1.59