-
Notifications
You must be signed in to change notification settings - Fork 16
100 lines (86 loc) · 2.57 KB
/
test.yml
File metadata and controls
100 lines (86 loc) · 2.57 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
name: Tests
on:
push:
branches: ["main"]
tags: [ "v*.*.*" ]
pull_request:
workflow_call:
workflow_dispatch:
jobs:
tests:
name: ✅ Run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["ubuntu-latest"]
python-version: ["3.11", "3.12", "3.13"]
# onnxruntime not available for "3.14"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: uv run pytest
docker:
name: 🐳 Build Docker image
runs-on: ubuntu-latest
# needs: tests
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
# - name: Log in to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/sib-swiss/sparql-llm
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build Docker image
id: build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64, linux/arm64
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# outputs: type=image,name=ghcr.io/eosc-data-commons/data-commons-mcp,push-by-digest=true,name-canonical=true,push=true
generate-changelog:
name: 🏔️ Generate changelog for the GitHub release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: CHANGES.md