mirror of
https://github.com/Receipt-Wrangler/receipt-wrangler-api.git
synced 2026-01-21 10:30:36 -06:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
---
|
|
name: Build
|
|
on:
|
|
workflow_dispatch:
|
|
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.23.2"
|
|
- name: Install app dependencies
|
|
run: sudo sh set-up-dependencies.sh
|
|
- name: Build
|
|
run: go build -v ./...
|
|
- name: Test
|
|
run: go test -coverprofile=coverage.out -covermode=atomic -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
|
|
|
|
dispatch:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get today's date
|
|
run: echo "TODAY_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
|
- name: Repository Dispatch
|
|
uses: peter-evans/repository-dispatch@v3.0.0
|
|
with:
|
|
token: ${{ secrets.PAT }}
|
|
repository: Receipt-Wrangler/receipt-wrangler-monolith
|
|
event-type: build
|
|
client-payload: |
|
|
{
|
|
"version": "latest",
|
|
"build-date": "${{ env.TODAY_DATE }}"
|
|
}
|