-
Notifications
You must be signed in to change notification settings - Fork 122
65 lines (57 loc) · 1.85 KB
/
Copy pathci-quickstart.yml
File metadata and controls
65 lines (57 loc) · 1.85 KB
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
name: CI quickstart
on:
push:
branches: [main]
pull_request:
paths:
- ".github/workflows/ci-quickstart.yml"
- ".github/run-quickstart-as-lit-jobs.py"
- ".github/load-quickstart-report.py"
- "examples/quickstart/*"
workflow_dispatch: {}
schedule:
- cron: "0 0 * * *" # every midnight
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
defaults:
run:
shell: bash
jobs:
launcher-quickstart:
runs-on: "ubuntu-22.04"
#timeout-minutes: 55
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build package
run: |
pip install -U build
python -m build --sdist --wheel --outdir dist/
ls -l dist/
- name: Run scripts in jobs
env:
LIGHTNING_USER_ID: ${{ secrets.LIGHTNING_USER_ID }}
LIGHTNING_API_KEY: ${{ secrets.LIGHTNING_API_KEY }}
run: |
pip install lightning_sdk -U -q
python .github/run-quickstart-as-lit-jobs.py ${{ github.run_id }}
- name: Load report
if: always()
id: load-report
run: |
report=$(python .github/load-quickstart-report.py)
echo "REPORT<<EOF" >> $GITHUB_ENV
echo "$report" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: act10ns/slack@v2
if: always() && github.event_name != 'pull_request' && steps.load-report.conclusion == 'success'
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
message: |
*Quickstart CI* - [${{ job.status }}]
${{ env.REPORT }}
ref: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}