Repository navigation
116 lines (105 loc) · 2.93 KB
/
Copy pathci.yml
File metadata and controls
116 lines (105 loc) · 2.93 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Syntax and build checks for every example.
# This workflow never calls the NetArz API and needs no key or secret.
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
python:
name: Python (py_compile)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Compile every .py file
run: find . -name '*.py' -not -path './.git/*' -print0 | xargs -0 python -m py_compile
node:
name: Node.js (node --check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "20"
- name: Check every .mjs file
run: |
find . -name '*.mjs' -not -path '*/node_modules/*' -print0 |
xargs -0 -n1 node --check
php:
name: PHP ${{ matrix.php }} (php -l)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: none
- name: Lint every .php file
run: |
find . -name '*.php' -not -path './vendor/*' -not -path '*/vendor/*' -print0 |
xargs -0 -n1 php -l
go:
name: Go (gofmt, vet, build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go/go.mod
cache: false
- name: gofmt
run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; }
- run: go vet ./...
- run: go build ./...
dotnet:
name: .NET (dotnet build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: "8.0.x"
- run: dotnet build dotnet/NetArzAiExamples.csproj --configuration Release
ruby:
name: Ruby (ruby -c)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Check every .rb file
run: find . -name '*.rb' -not -path './.git/*' -print0 | xargs -0 -n1 ruby -c
shell:
name: Shell (shellcheck)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: shellcheck curl/*.sh
run: shellcheck curl/*.sh
json:
name: JSON files parse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Parse every .json file
run: |
find . -name '*.json' -not -path './.git/*' -not -path '*/node_modules/*' -print0 |
xargs -0 -n1 python3 -m json.tool > /dev/null