Skip to content

Commit 7b602ff

Browse files
committed
add tests to gh ci
1 parent 3d1f827 commit 7b602ff

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Setup Python Environment"
2+
description: "Set up Python environment for the given Python version"
3+
4+
inputs:
5+
python-version:
6+
description: "Python version to use"
7+
required: true
8+
default: "3.13"
9+
uv-version:
10+
description: "uv version to use"
11+
required: true
12+
default: "0.6.17"
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ inputs.python-version }}
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
version: ${{ inputs.uv-version }}
25+
enable-cache: "true"
26+
cache-suffix: ${{ matrix.python-version }}
27+
28+
- name: Install Python dependencies
29+
run: uv sync --frozen
30+
shell: bash

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Main
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
15+
fail-fast: false
16+
defaults:
17+
run:
18+
shell: bash
19+
steps:
20+
- name: Check out
21+
uses: actions/checkout@v4
22+
23+
- name: Set up the environment
24+
uses: ./.github/actions/setup-python-env
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Run robot acceptance tests
29+
run: uv run robotcode robot .
30+
31+
- name: Run pytest unit tests
32+
run: uv run pytest .

0 commit comments

Comments
 (0)