Skip to content

Nightly

Nightly #39

Workflow file for this run

name: Nightly
on:
schedule:
- cron: "0 7 * * 1-5"
workflow_dispatch:
jobs:
# In parallel, we run:
# a) all the tests
# b) the mixed-mode tests
# c) the nightly tests
# The nightly tests (currently) include all the regular tests, but we want to publish to teamscale the coverage
# statistics we're getting from PRB separately. We want to be able to differentiate those two types of coverage
# in teamscale for a better understanding of what might escape in PRB (or in our pre-release test run).
# The mixed-mode coverage is a little different, we want to see explicitly what code is being covered in mixed-mode
# so that we can find potential uncovered code that could expose bugs when multiple versions are running at the same
# time.
# It's possible that we could change the nightly tests to just be the nightly tests, and not the regular tests in the future.
test:
if: github.repository == 'FoundationDB/fdb-record-layer'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v6.0.2
- name: Setup Base Environment
id: setup-base
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: jar test destructiveTest codeCoverageReport
gradle_args: -PreleaseBuild=false -PpublishBuild=false
- name: Upload coverage to teamscale
# temporary until we validate that this is working correctly
continue-on-error: true
uses: ./actions/teamscale-upload
with:
partition: 'CI Tests'
revision: ${{ github.sha }}
files: "${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
teamscaleKey: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
### Mixed mode
# Get the versions of mixed-mode that we want to run
get-mixed-mode-versions:
if: github.repository == 'FoundationDB/fdb-record-layer'
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.versions }}
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Calculate versions
id: versions
uses: ./actions/list-recent-versions
# Run the actual mixed-mode tests
# This runs them in parallel by version, which is unnecessary, because it's nightly and we don't care if it takes
# 20 minutes or 2 hours, but this way we have the same config for PRB, nightly, and release
mixed-mode:
if: github.repository == 'FoundationDB/fdb-record-layer'
runs-on: ubuntu-latest
continue-on-error: true
needs: get-mixed-mode-versions
strategy:
matrix:
version: ${{ fromJSON(needs.get-mixed-mode-versions.outputs.versions) }}
permissions:
contents: read
timeout-minutes: 40
steps:
- name: Checkout sources
uses: actions/checkout@v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: jar mixedModeTest codeCoverageReport
# Setting tests.nightly would cause it to ignore failures at the gradle level.
# But, in the case of mixed-mode-test we are runnning with continue-on-error and using the result of the gradle
# task to populate the summary. Thus, there's no benefit to ignoring failures at the gradle level, and if we
# did, we'd need more complicated logic to have the results correctly display that an individual version
# failed.
# If we ever have more than one module that has mixed-mode test, or yaml-tests starts using nightly in a way
# that we want to impact mixedModeTest we'll probably want to change this, but for now we can keep it simple
gradle_args: -PreleaseBuild=false -PpublishBuild=false -Ptests.mixedModeVersion=${{ matrix.version }}
report_name: mixed-mode-${{ matrix.version }}-test-reports
- name: Publish Coverage Data
uses: actions/upload-artifact@v7.0.1
with:
name: mixed-mode-${{ matrix.version }}-coverage-data
path: |
**/.out/jacoco/*.exec
**/.out/libs/*.jar
include-hidden-files: true
retention-days: 1
# This will upload multiple times, once for each of the old versions
- name: Upload coverage to teamscale
continue-on-error: true
uses: ./actions/teamscale-upload
with:
partition: 'Mixed Mode Tests'
revision: ${{ github.sha }}
files: "${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
teamscaleKey: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
# Print out the mixed mode results to the summary
mixed-mode-results:
if: github.repository == 'FoundationDB/fdb-record-layer'
needs: [mixed-mode]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout HEAD sources
uses: actions/checkout@v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: 'Download results'
uses: actions/download-artifact@v8.0.0
with:
pattern: 'mixed-mode-*-test-reports'
- name: Generate mixed mode results
uses: ./actions/publish-mixed-mode-results
### Nightly
nightly_test:
if: github.repository == 'FoundationDB/fdb-record-layer'
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: jar test destructiveTest codeCoverageReport
gradle_args: "-PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport -Ptests.includeRandom -Ptests.iterations=2 -Ptests.nightly"
report_name: nightly-test-reports
- name: Upload coverage to teamscale
# temporary until we validate that this is working correctly
continue-on-error: true
uses: ./actions/teamscale-upload
with:
partition: 'Nightly Tests'
revision: ${{ github.sha }}
files: "${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
teamscaleKey: ${{ secrets.TEAMSCALE_ACCESS_KEY }}