4 Commits

Author SHA1 Message Date
872c7b356f Merge pull request 'feature/improve_test_automation' (#2) from feature/improve_test_automation into main
All checks were successful
Run short tests / run-tests (push) Successful in 1m5s
Run nightly tests / nightly-tests (push) Successful in 1m37s
Reviewed-on: #2
2025-07-15 17:42:21 +02:00
6fab12e7bd upload artifacts v3
All checks were successful
Run short tests / run-tests (push) Successful in 1m38s
Run short tests / run-tests (pull_request) Successful in 1m6s
2025-07-15 17:39:36 +02:00
cbdc1295f2 Modify coverage upload
Some checks failed
Run short tests / run-tests (push) Failing after 1m11s
2025-07-15 17:37:47 +02:00
a7ae5d465c try to upload coverage out
Some checks failed
Run short tests / run-tests (push) Failing after 2m18s
2025-07-15 17:33:27 +02:00
2 changed files with 21 additions and 61 deletions

View File

@@ -1,70 +1,22 @@
name: Run nightly tests
on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *' # Every day at 20:00 UTC
push:
branches:
- main
jobs:
build:
nightly-tests:
runs-on: [ubuntu-latest, cloud]
steps:
- uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.23'
# - name: build
# working-directory: ./src
# run: |
# go build
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# path: ${{ github.workspace }}/src/home-automation-backend
# name: home-automation-backend_build_${{ github.run_number }}
# retention-days: 1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
nightly-tests-play:
runs-on: [ubuntu-latest, cloud]
needs: build
steps:
- name: Put token into config file
run: |
cat <<EOF > ${GITHUB_WORKSPACE}/config.json
{
"token": "${{ secrets.TEST_TOKEN }}"
}
EOF
- name: print config file
run: cat ${GITHUB_WORKSPACE}/config.json
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: home-automation-backend_build_${{ github.run_number }}
# - name: Print helping message
# run: |
# chmod +x ${GITHUB_WORKSPACE}/home-automation-backend
# ${GITHUB_WORKSPACE}/home-automation-backend help
# nightly-tests:
# runs-on: [ubuntu-latest, cloud]
# needs: build
# steps:
# - uses: actions/checkout@v4
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: home-automation-backend_build_${{ github.run_number }}
# - name: Check files
# run: ls -lR
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.23'
# - name: build
# run: go build
# - name: Run nightly tests
# working-directory: ./tests
# run: go test -v --short ./...
- name: Test
working-directory: ./src
run: go test -v --short ./...

View File

@@ -13,8 +13,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
go-version: '1.24'
- name: Test
- name: Run short tests with coverage
working-directory: ./src
run: go test -v --short ./...
run: | # TODO: at this moment only Home Assistant component is tested
go test -v --short ./components/homeassistant/... -cover -coverprofile=cover.out
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report_build_${{ github.run_number }}
path: ${{ github.workspace }}/src/cover.out
retention-days: 1