Skip to content

Merge pull request #285 from Receipt-Wrangler/enhancement/tie-system-… #226

Merge pull request #285 from Receipt-Wrangler/enhancement/tie-system-…

Merge pull request #285 from Receipt-Wrangler/enhancement/tie-system-… #226

Workflow file for this run

---
name: Build
on:
push:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Install tesseract dependencies
run: sudo sh set-up-dependencies.sh
- name: Build
run: go build -v ./...
- name: Test
run: go test -coverprofile=coverage.out -covermode=atomic -p 1 -v ./...
- name: Upload Coverage Report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Test imap client
run: python3 -m unittest discover -s ./imap-client
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "linux/arm64, linux/amd64"
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and push
uses: docker/[email protected]
with:
context: .
platforms: linux/arm64/v8, linux/amd64
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/receipt-wrangler-api:latest
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: Receipt-Wrangler/receipt-wrangler-monolith
event-type: build