Test - Nightly #201
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] | |
steps: | |
- name: Setup Ubuntu dependencies | |
run: | | |
DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata | |
apt install -y curl systemctl build-essential lsb-release python3-pip git libgl1-mesa-glx libglib2.0-0 ca-certificates jq htop gource ffmpeg xvfb python3.10-venv libavcodec-extra python3.11-full python3.10-full libpython3.10-dev libpython3.11-dev | |
python3 -m pip install --upgrade pipx | |
- uses: actions/checkout@v3 | |
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 | |
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 # optional (default = false) | |
test_on_windows: | |
runs-on: [self-hosted, windows] | |
steps: | |
- uses: actions/checkout@v3 | |
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, mini] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: | | |
3.10 | |
3.11 | |
- name: Run Nox Quick-Tests | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade nox | |
python -m pip install --upgrade build | |
python -m nox --sessions test_source clear_wheelhouse build_wheel build_sdist test_wheel | |
env: | |
LOG_LEVEL: ${{ github.event.inputs.logLevel }} | |
AGENT_TOOLS_DIRECTORY: / | |
generate_movie: | |
runs-on: [self-hosted, ubuntu] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
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 |