Skip to content

Commit 74be5db

Browse files
committed
ci: build CI to ensure the local package always works
this tests in two ways: - install the package locally in each major os/architecture combination supported by GitHub Actions, then run `editorconfig-checker --version` like `run-tests.sh` does - running `run-tests.sh` once in an ubuntu machines The workflow is triggered both by pushes to any of the branches and for each pull request.
1 parent e7fdf4c commit 74be5db

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions: read-all
9+
10+
jobs:
11+
test-architectures:
12+
name: test OS/arch combinations
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- 'ubuntu-24.04'
18+
- 'ubuntu-24.04-arm'
19+
- 'macos-13' # the last intel mac
20+
- 'macos-15' # arm64 mac
21+
- 'windows-2025'
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: install local package
27+
run: |
28+
python -m pip install .
29+
30+
- name: test that editorconfig-checker works by letting it output it's version
31+
run: |
32+
ec --version
33+
34+
35+
test-python-versions:
36+
runs-on: ubuntu-24.04
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: install flake8
41+
run: |
42+
python -m pip install flake8
43+
44+
- name: run testsuite verifying against all python versions
45+
shell: bash
46+
run: |
47+
# only test the local package, since we assume that we only
48+
# upload to PyPI once we are certain that the local package is fine
49+
export TEST_LOCAL_PKG=true
50+
export TEST_PYPI_PKG=false
51+
52+
make test

0 commit comments

Comments
 (0)