Skip to content
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

Introduce tests and autotests in GitHub CI/CD #33

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
jobs:
test:
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]
os: ["ubuntu-22.04"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Include ppa repository
run: sudo add-apt-repository ppa:deadsnakes/ppa
- name: Set up Python ${{ matrix.python-version }}
run: |
sudo apt-get install python${{ matrix.python-version }}-dev
sudo update-alternatives --install /usr/bin/python3 python3 `which python${{ matrix.python-version }}` 1
sudo update-alternatives --install /usr/bin/python3-config python3-config `which python${{ matrix.python-version }}-config` 1
- name: Install requirements for testing
run: sudo python3 -m pip install mockito
- name: Run tests
run: python3 -m unittest tests
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,15 @@ and thus not have the client download them automatically.
- `qlx_workshopReferences`: A comma-separated list of workshop IDs for items you want to force the client to download.
Use this for custom resources, such as sounds packs and whatnot.

## Develop

To run unittests, use following commands:

```
git submodule update
python3 -m pip install mockito
python3 -m unittest tests
```

## Contribute
If you create pull requests, please try to not deviate from the coding style of the plugins (e.g. don't use camelCase variable names and stuff like that), and please create the PR against the develop branch of the repository.
Loading