-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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 |