-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (61 loc) · 1.62 KB
/
Copy pathvalidate.yml
File metadata and controls
69 lines (61 loc) · 1.62 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
66
67
68
69
name: validate
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
defaults:
run:
shell: bash
jobs:
clear-status:
runs-on: ubuntu-latest
steps:
- name: Clear status
uses: myrotvorets/set-commit-status-action@v2.0.1
if: ${{ !env.ACT }}
with:
context: build-test-status
status: "pending"
token: ${{ secrets.GH_TOKEN }}
sha: ${{ github.sha }}
build-test:
runs-on: ubuntu-latest
needs: [clear-status]
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v5.3.0
with:
python-version: '3.10'
- uses: lukka/get-cmake@v3.30.5
with:
cmakeVersion: "~3.22.1"
ninjaVersion: "^1.10.1"
- name: Create venv
run: |
python -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r .github/requirements.txt
- name: Validate Scheme
run: |
.venv/bin/python .github/json_validator.py --data=predefined_url.json --schema=.github/predefined_url.schema
post-status:
name: Post Status
runs-on: ubuntu-latest
needs: [clear-status, build-test]
if: always()
steps:
- name: Update commit status
uses: myrotvorets/set-commit-status-action@v2.0.1
if: ${{ !env.ACT }}
with:
context: build-test-status
status: ${{ job.status }}
token: ${{ secrets.GH_TOKEN }}
sha: ${{ github.sha }}