Skip to content

cli/ci: avoid stdin hang and add weekly parity alert #6

cli/ci: avoid stdin hang and add weekly parity alert

cli/ci: avoid stdin hang and add weekly parity alert #6

Workflow file for this run

name: parity
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 9 * * 1"
jobs:
parity:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install parity dependencies
run: bash scripts/ci/setup_parity_env.sh
- name: Run parity tests
run: bash scripts/ci/run_parity_tests.sh
- name: Notify Discord on scheduled parity failure
if: failure() && github.event_name == 'schedule' && env.DISCORD_WEBHOOK != ''
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
run_url="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
payload=$(printf '{"content":"parity cron failed for %s: %s"}' "$GITHUB_REPOSITORY" "$run_url")
curl -sS -X POST -H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK"
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
mkdir -p dist
go build -o "dist/apprise-go-${GOOS}-${GOARCH}" ./cmd/apprise
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: apprise-go-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/apprise-go-${{ matrix.goos }}-${{ matrix.goarch }}