-
Notifications
You must be signed in to change notification settings - Fork 13
83 lines (82 loc) · 2.6 KB
/
Copy pathtest.yaml
File metadata and controls
83 lines (82 loc) · 2.6 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
81
82
83
---
name: Test shacl2code
on:
push:
# Skip changes in docs and other workflows
paths: &trigger-paths
- "**"
- "!**/*.md"
- "!LICENSE"
- "!.github/ISSUE_TEMPLATE/**"
- "!.github/workflows/**"
- ".github/workflows/test.yaml"
pull_request:
paths: *trigger-paths
workflow_call:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-latest
python-version: "3.10"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
npm install -g jsonld-cli
npm --prefix scripts ci
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y build-essential cppcheck doxygen graphviz
- name: Install macOS packages
if: runner.os == 'macOS'
run: |
brew update
brew install cppcheck doxygen gcc go graphviz
- name: Install Rust static analysis tools
run: |
rustup component add clippy
- name: Build package
run: |
python -m build
- name: Install package
run: |
pip install -e .[dev]
- name: Run tests
run: |
pytest -v
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
# Black in this Python version must support all target-versions listed in pyproject.toml
python-version: "3.14"
- uses: psf/black@87928e6d6761a4a6d22250e1fee5601b3998086e # 26.5.1
- uses: py-actions/flake8@84ec6726560b6d5bd68f2a5bed83d62b52bb50ba # v2.3.0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-format
- name: Check code formatting
run: |
./scripts/format.sh
git diff --exit-code