forked from arup-group/genet
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2.3 KB
/
daily-scheduled-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Daily GeNet CI Build
on:
schedule:
- cron: '37 14 * * 1-5'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
export ACCEPT_EULA=Y
sudo apt-get update
python -m pip install --upgrade pip
sudo apt-get install -y python3-pip libgdal-dev locales
sudo apt-get install -y libspatialindex-dev
sudo apt-get install -y coinor-cbc
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
sudo apt-get install ca-certificates
export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
pip install GDAL==3.4.1
pip install -e '.[dev]'
- name: Install jupyter kernel
run: python -m ipykernel install --user --name genet
- name: Run tests
run: pytest
- name: Send build success notification
if: success()
uses: rtCamp/[email protected]
env:
SLACK_MESSAGE: ${{ github.repository }} Daily scheduled CI Build ${{ github.run_number }} has succeeded
SLACK_TITLE: Daily Scheduled CI Build Success
SLACK_CHANNEL: city-modelling-feeds
SLACK_USERNAME: GitHub Build Bot
SLACK_ICON: https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-12-19/288981919427_f45f04edd92902a96859_512.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- name: Send build failure notification
if: failure()
uses: rtCamp/[email protected]
env:
SLACK_COLOR: '#FF0000'
SLACK_LINK_NAMES: true
SLACK_MESSAGE: '<!here> ${{ github.repository }} Daily scheduled CI Build ${{ github.run_number }} has failed'
SLACK_TITLE: Daily Scheduled CI Build Failure!
SLACK_CHANNEL: city-modelling-feeds
SLACK_USERNAME: GitHub Build Bot
SLACK_ICON: https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-12-19/288981919427_f45f04edd92902a96859_512.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}