Skip to content

Commit bc58b96

Browse files
author
Dale Myers
committed
Switch to GitHub actions
1 parent 5e1b2a4 commit bc58b96

4 files changed

Lines changed: 94 additions & 96 deletions

File tree

.azure/azure-pipelines.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.azure/publish.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
22+
- name: Install Poetry
23+
run: curl -sSL https://install.python-poetry.org | python3 -
24+
25+
- name: Install dependencies
26+
run: poetry install
27+
28+
- name: Build
29+
run: poetry build
30+
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: macos-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11"]
15+
max-parallel: 4
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install Poetry
26+
run: curl -sSL https://install.python-poetry.org | python3 -
27+
28+
- name: Install dependencies
29+
run: poetry install
30+
31+
- name: Lint
32+
run: |
33+
poetry run pylint --rcfile=pylintrc xcodeproj
34+
poetry run pylint --rcfile=pylintrc tests
35+
36+
- name: Type Check
37+
run: |
38+
poetry run mypy --ignore-missing-imports xcodeproj/
39+
poetry run mypy --ignore-missing-imports tests/
40+
41+
- name: Test
42+
run: |
43+
poetry run pytest tests --cov=xcodeproj --cov-report html --cov-report xml --doctest-modules --junitxml=junit/test-results.xml
44+
45+
- name: Inline CSS
46+
run: poetry run python inlinecss.py htmlcov
47+
48+
- name: Upload test results
49+
if: always()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: test-results-${{ matrix.python-version }}
53+
path: junit/test-results.xml
54+
55+
- name: Upload coverage report
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: coverage-${{ matrix.python-version }}
60+
path: |
61+
coverage.xml
62+
htmlcov/

0 commit comments

Comments
 (0)