-
Notifications
You must be signed in to change notification settings - Fork 6
improve tests and build CI infrastructure #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
76bc4bf
304f2f6
d39feee
a84754e
c5346b9
e7fdf4c
74be5db
684bb40
b7973eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| test-architectures: | ||
| name: test OS/arch combinations | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - 'ubuntu-24.04' | ||
| - 'ubuntu-24.04-arm' | ||
| - 'macos-13' # the last intel mac | ||
| - 'macos-15' # arm64 mac | ||
| - 'windows-2025' | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: install local package | ||
| run: | | ||
| python -m pip install . | ||
|
|
||
| - name: test that editorconfig-checker works by letting it output it's version | ||
| run: | | ||
| ec --version | ||
klaernie marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also a kinda weak test, as there's only the exit code that can make the step, thus the workflow, fail. I remember that for Megalinter, the published binaries for a go tool (probably revive), didn't actually have a version information (maybe limited to the ones released through Docker images). The workaround needed was to build ourselves, like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was intentionally mirroring the |
||
|
|
||
| test-python-versions: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: install flake8 | ||
| run: | | ||
| python -m pip install flake8 | ||
|
|
||
| - name: run testsuite verifying against all python versions | ||
| shell: bash | ||
| run: | | ||
| # Only test the local package, since we assume that we only | ||
| # upload to PyPI once we are certain that the local package is fine. | ||
| export TEST_LOCAL_PKG=true | ||
| export TEST_PYPI_PKG=false | ||
|
|
||
| # The same commands are defined in the `Makefile` and used for local development. | ||
| # We added them here to simplify the building process of the Docker | ||
| # image that points to `python:2.7-slim`. | ||
| # For such image, `apt-get` was not working as expected. | ||
| flake8 --ignore E501 setup.py | ||
| bash run-tests.sh | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Dockerfile is run by `run-tests.sh` | ||
|
|
||
| # used to define the python tag | ||
| ARG IMAGE=3.13-slim | ||
|
|
||
|
|
||
| FROM python:$IMAGE AS pybase | ||
| RUN python -m pip install --upgrade pip | ||
|
|
||
| # separate the obtaining of the requirements from the actual test, so we can use build caching for the first step | ||
| FROM pybase as tester | ||
| LABEL maintainer="Marco M. (mmicu) <[email protected]>" | ||
|
|
||
| COPY . /app | ||
| WORKDIR /app | ||
|
|
||
| # used to define which python package is installed with pip: | ||
| # - a value of `.` builds the images using the docker build context - aka the revision of the package which is currently checked out | ||
| # - using a value of `editorconfig-checker` will instead pull the image from PyPI | ||
| ARG PACKAGE=. | ||
|
|
||
| RUN pip install --no-cache-dir $PACKAGE |
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.