ci: add a nightly build
this is interesting for the functional testing of the tool
This commit is contained in:
parent
bebfe00500
commit
028d97fa73
1 changed files with 35 additions and 0 deletions
35
.gitea/workflows/nightly.yml
Normal file
35
.gitea/workflows/nightly.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Nightly Functional Tests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Runs every day at midnight UTC
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch: # Allows manual trigger from the UI
|
||||
|
||||
jobs:
|
||||
functional:
|
||||
runs-on: codeberg-small
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
with:
|
||||
ref: main # Always test the main branch
|
||||
|
||||
- name: Set up Go
|
||||
uses: https://github.com/actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: true
|
||||
|
||||
- name: Build production binary
|
||||
run: |
|
||||
make build
|
||||
echo "Binary built at: $(pwd)/bin/fgj"
|
||||
|
||||
- name: Run functional tests
|
||||
run: go test -v -race -tags=functional ./tests/functional/...
|
||||
env:
|
||||
CODEBERG_TEST_TOKEN: ${{ secrets.CODEBERG_TEST_TOKEN }}
|
||||
CODEBERG_TEST_OWNER: ${{ vars.CODEBERG_TEST_OWNER }}
|
||||
CODEBERG_TEST_REPO: ${{ vars.CODEBERG_TEST_REPO }}
|
||||
CODEBERG_TEST_HOSTNAME: ${{ vars.CODEBERG_TEST_HOSTNAME || 'codeberg.org' }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue