nightly releases #994
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: nightly releases | |
on: | |
schedule: | |
# Run at 20:00 UTC Every Day | |
- cron: "0 20 * * *" | |
jobs: | |
version-override: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set Git config | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Github Actions" | |
- name: Rebase with main and update version | |
run: | | |
git fetch --unshallow | |
git checkout main | |
git pull --rebase | |
git checkout nightly | |
git pull --rebase | |
git merge main --strategy-option theirs | |
git checkout main -- ./aim/VERSION | |
. ./.github/scripts/override-version.sh | |
git add ./aim/VERSION | |
git commit -m "Update VERSION file" | |
git push | |
run-checks: | |
runs-on: ubuntu-latest | |
name: Run Unit-tests & Code-style checks | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: 'nightly' | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
architecture: x64 | |
- name: install deps | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.dev.txt | |
python -m pip install -r tests/requirements.txt | |
- name: code style checks | |
run: | | |
set -e | |
ruff check . | |
ruff format . --check | |
- name: unit-tests | |
run: | | |
pytest tests || pytest --lf tests | |
trigger-packaging-workflow: | |
needs: version-override | |
uses: ./.github/workflows/python-package.yml | |
secrets: | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
with: | |
branch: nightly |