Skip to content

nightly

nightly #1576

Workflow file for this run

name: nightly
on:
schedule:
- cron: '0 7 * * *' # run at 7 AM UTC == midnight PST
workflow_dispatch:
jobs:
markdown-link-check-full:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.12
- uses: actions/setup-node@v4
with:
node-version: '12'
- name: Install manual dependencies
run: |
sudo npm install -g [email protected]
python -m pip install pre-commit
pre-commit install
- name: Run markdown checker
run: |
pre-commit run --hook-stage manual markdown-link-check-full --all-files
full-pytest:
runs-on: ubuntu-latest
# TODO: Re-use pytest workflow once https://github.com/github/roadmap/issues/257 is done.
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/workflows/pytest.yml
# with:
# # Run all tests.
# pytest_markers: "not slow or slow"
env:
TEST_ENFORCE_BUFFER_KEY_TYPES: 1
strategy:
# If one test in the matrix fails we still want to run the others.
fail-fast: false
matrix:
python-version: [3.10.12]
include:
- python-version: 3.10.12
pip_constraints: test_constraints_version.txt
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('ml-agents/setup.py', 'ml-agents-envs/setup.py', 'test_requirements.txt', matrix.pip_constraints) }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --progress-bar=off -e ./ml-agents-envs -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -e ./ml-agents -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -r test_requirements.txt -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -e ./ml-agents-plugin-examples -c ${{ matrix.pip_constraints }}
- name: Save python dependencies
run: |
pip freeze > pip_versions-${{ matrix.python-version }}.txt
cat pip_versions-${{ matrix.python-version }}.txt
- name: Run pytest
run: |
pytest --cov=ml-agents --cov=ml-agents-envs \
--cov-report=html --junitxml=junit/test-results-${{ matrix.python-version }}.xml \
-p no:warnings -v -n 8
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.python-version }}
path: |
htmlcov
pip_versions-${{ matrix.python-version }}.txt
junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}