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 f64e6f1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
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:
runs-on: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }}
needs: build
steps:
- run: python -m unittest

build-and-test:
uses: ./.github/workflows/test-on-kube.yml
needs: tag-pr
Expand Down

0 comments on commit f64e6f1

Please sign in to comment.