Skip to content

Commit

Permalink
Experimental Nightly Build (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzaffi committed Feb 13, 2023
1 parent 8531f4b commit df4931e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Nightly Build"
on:
schedule:
- cron: "10 * * * *"

jobs:
check-date:
runs-on: ubuntu-20.04
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}

- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"

build-test:
needs: [check-date]
if: ${{ github.event_name == 'release' || needs.check_date.outputs.should_run == 'true' }}

runs-on: ubuntu-20.04
container: python:${{ matrix.python }}
strategy:
matrix:
python: ["3.10", "3.11"]
steps:
- run: python3 --version
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install python dependencies
run: make setup-development
- name: Build and Unit Tests
run: make lint-and-test

0 comments on commit df4931e

Please sign in to comment.