Test - Nightly #297
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test - Nightly | |
# does a massive check, every night | |
on: | |
schedule: | |
- cron: "0 23 * * *" | |
# creates a button | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
jobs: | |
test_on_ubuntu_container: | |
runs-on: [self-hosted, Ubuntu, Docker] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: | | |
3.9 | |
3.10 | |
3.11 | |
- name: Run Nox Quick-Tests | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade nox | |
python -m nox --sessions test_source clear_wheelhouse build_wheel build_sdist test_wheel | |
env: | |
LOG_LEVEL: ${{ github.event.inputs.logLevel }} | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: coverage.xml # optional | |
flags: pytests # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: true # op | |
test_on_windows: | |
runs-on: [self-hosted, Windows] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: | | |
3.9 | |
3.10 | |
3.11 | |
- name: Run Nox Quick-Tests | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade nox | |
python -m nox --sessions test_source clear_wheelhouse build_wheel build_sdist test_wheel | |
env: | |
LOG_LEVEL: ${{ github.event.inputs.logLevel }} | |
test_on_macos: | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: | | |
3.10 | |
3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade nox | |
python -m pip install cibuildwheel==2.15.0 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
# to supply options, put them in 'env', like: | |
env: | |
CIBW_BUILD: cp39-macosx_arm64 cp310-macosx_arm64 cp311-macosx_arm64 | |
CIBW_ARCHS: arm64 | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_TEST_COMMAND: "pytest {project}/tests" | |
- name: Build wheels | |
run: python -m nox --sessions test_source test_wheel | |
env: | |
LOG_LEVEL: ${{ github.event.inputs.logLevel }} | |
AGENT_TOOLS_DIRECTORY: / | |
generate_movie: | |
runs-on: [self-hosted, Linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Generate movie | |
run: | | |
xvfb-run gource --output-custom-log repo-activity.log | |
python3 -c "txt=open('repo-activity.log').read();txt=txt.replace('Bruno Manuel Santos Saraiva', 'Bruno Saraiva').replace('inesmcunha', 'Inês Cunha').replace('antmsbrito', 'António Brito');open('repo-activity.log', 'w').write(txt)" | |
xvfb-run gource --highlight-dirs --highlight-users repo-activity.log -1280x720 --max-user-speed 100 --seconds-per-day 0.1 --auto-skip-seconds 1 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -pix_fmt yuv420p gource.mp4 | |
- name: Archive generated movie | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gource-movie | |
path: gource.mp4 | |
retention-days: 3 |