Repository navigation
81 lines (77 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
81 lines (77 loc) · 1.92 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
name: CI
on:
push:
branches: [ master, main ]
tags: [ 'v*' ]
pull_request:
branches: [ master, main ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
services:
petstore:
image: swaggerapi/petstore
ports:
- 8080:8080
petstore-oas3:
image: openapitools/openapi-petstore
ports:
- 8081:8080
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.11'
- name: Checkout Test Harness
uses: actions/checkout@v7
with:
repository: SamuelMarks/cdd-openapi-test-harness
path: cdd-openapi-test-harness
- name: Install dependencies
run: |
pip install uv
make install_deps
- name: Run pre-commit hooks
env:
TEST_HARNESS_DIR: ${{ github.workspace }}/cdd-openapi-test-harness
RUN_SLOW_TESTS: 1
run: |
uv tool install pre-commit --with pre-commit-uv
pre-commit run --all-files
- name: Test
run: make test
- name: Build
run: make build
- name: Install binaryen
run: sudo apt-get update && sudo apt-get install -y binaryen
- name: Build WASM
run: |
make build_wasm
for f in bin/*.wasm; do
if [ -f "$f" ]; then
wasm-opt -O3 "$f" -o "$f" || true
cp "$f" dist/
fi
done
- name: Upload Build Artifacts
uses: actions/upload-artifact@v7
with:
name: python-build
path: dist/
release:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: python-build
path: dist/
- name: Release
uses: softprops/action-gh-release@v3
with:
files: dist/**/*