Skip to content

Commit

Permalink
Add build and test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Oct 9, 2023
1 parent 4e000cf commit de3f353
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }}

test:
needs: build
runs-on: ubuntu-latest
container:
image: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }}
steps:
- run: python -m unittest

build-and-test:
uses: ./.github/workflows/test-on-kube.yml
needs: tag-pr
Expand Down
12 changes: 12 additions & 0 deletions secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: isindir.github.com/v1alpha3
kind: SopsSecret
metadata:
name: sops-secret
spec:
secretTemplates:
- name: basegun-preprod-secret
stringData:
API_OVH_TOKEN: 16va230de1m522bqprp5qhjbpd5d0enm34biht4mmlbsc74ds36j
X_OVH_TOKEN: c66a45f6-68fb-4a33-bff2-77392e465038
AWS_ACCESS_KEY_ID: 17b1a48a696d4ec488f79f71a0e1580a
AWS_SECRET_ACCESS_KEY: ddff8523e4dd4530a74b560cf0cd406f

0 comments on commit de3f353

Please sign in to comment.