-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 2.35 KB
/
Copy pathvalidate-schema-test.yml
File metadata and controls
80 lines (72 loc) · 2.35 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
70
71
72
73
74
75
76
77
78
79
80
name: validate-devschema-test
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 12 30 * *'
workflow_dispatch:
jobs:
test-action:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.14"
SCHEMA_FILE: "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json"
DATA_FILE: ".devcontainer/devcontainer.json"
VERBOSE: "false"
steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
- name: Set Up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 #v7.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry via pip
run: |
echo "::group::Install Poetry"
if [[ "$VERBOSE" == "true" ]]; then
python -m pip install --upgrade pip
python -m pip install "poetry==1.8.5"
poetry --version
else
python -m pip install --upgrade pip > /dev/null 2>&1
python -m pip install "poetry==1.8.5" > /dev/null 2>&1
poetry --version > /dev/null 2>&1
fi
echo "::endgroup::"
shell: bash
- name: Install Dependencies with Poetry
env:
# Needed for rpds-py builds on CPython 3.14 until upstream wheels/tooling catch up.
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
run: |
echo "::group::Install Dependencies"
if [[ "$VERBOSE" == "true" ]]; then
poetry install --with dev
else
poetry install --with dev > /dev/null 2>&1
fi
pwd
ls
echo "::endgroup::"
shell: bash
- name: Set Verbose Mode
run: |
echo "::group::Set Verbose Mode"
if [[ "$VERBOSE" == "true" ]]; then
echo "Verbose mode enabled."
else
echo "Verbose mode disabled."
fi
echo "::endgroup::"
shell: bash
- name: Validate DevContainer JSON Schema
run: |
echo "::group::Validate JSON Schema"
poetry run python -m src.validate_devschema.main \
--schema "$SCHEMA_FILE" \
--data "$DATA_FILE" \
$([[ "$VERBOSE" == "true" ]] && echo "--verbose")
echo "::endgroup::"
shell: bash