-
Notifications
You must be signed in to change notification settings - Fork 75
62 lines (51 loc) · 1.76 KB
/
Copy pathci-rosetta-cli.yml
File metadata and controls
62 lines (51 loc) · 1.76 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
name: CI Rosetta CLI
# Pre-merge gate: build + tests for the rosetta-cli package on every PR that
# touches it. Complements publish-rosetta-cli.yml, which only runs on push to
# main (publish time) and is not a pre-merge gate. Mirrors that workflow's
# test/build steps so a green CI here means the publish job will pass.
on:
pull_request:
paths:
- 'src/rosetta-cli/**'
- 'requirements.txt'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# mypy.ini lists src/rosetta-cli in files=, but the only other mypy entrypoint
# (src/validate-types.sh, run from ci-rosetta-mcp.yml) is path-filtered to
# src/rosetta-mcp-server/**. mypy is invoked directly rather than through that
# script to keep this gate scoped to this job's own paths: the script checks
# the whole files= set, so a rosetta-cli PR would also gate on the MCP server.
- name: Run type validation
run: |
python -m mypy --config-file mypy.ini src/rosetta-cli
- name: Run CLI tests
run: |
pytest src/rosetta-cli/tests -v
- name: Build package
working-directory: ./src/rosetta-cli
run: |
python -m build
- name: Check package
working-directory: ./src/rosetta-cli
run: |
twine check dist/*