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

Add GitHub actions for unittests, matrix_is_tester tests, black and flake8 #346

Merged
merged 14 commits into from
May 28, 2021
16 changes: 16 additions & 0 deletions .github/workflows/changelog_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Changelog
on: [pull_request]

jobs:
check-newsfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.sha}}
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install towncrier
- run: python -m towncrier.check --compare-with="origin/main"
callahad marked this conversation as resolved.
Show resolved Hide resolved
59 changes: 59 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Linting and tests
on: [push]
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- run: python -m pip install -e .
- run: black --check --diff sydent/ tests/ matrix_is_test/ setup.py
- run: flake8 sydent/ tests/ matrix_is_test/ setup.py

run-unit-tests-python3-6:
needs: [check-code-style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- run: python -m pip install -e .
- run: trial tests
H-Shay marked this conversation as resolved.
Show resolved Hide resolved

run-matrix-is-tests-python3-6:
needs: [check-code-style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- run: python -m pip install -e .
- run: pip install git+https://github.com/matrix-org/matrix-is-tester.git
- run: trial matrix_is_tester

run-unit-tests-python3-9:
needs: [check-code-style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- run: python -m pip install -e .
- run: trial tests

run-matrix-is-tests-python3-9:
needs: [check-code-style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- run: python -m pip install -e .
- run: pip install git+https://github.com/matrix-org/matrix-is-tester.git
- run: trial matrix_is_tester
1 change: 1 addition & 0 deletions changelog.d/346.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add github actions for unittests (python 3.6 and 3.9), matrix_is_tester tests (python 3.6 and 3.9), towncrier checks and black and flake8 codestyle checks
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def read(fname):
"six>=1.10",
"pyyaml>=3.11",
"mock>=3.0.5",
"flake8==3.9.0",
"black==20.8b1",
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
],
# make sure we package the sql files
include_package_data=True,
Expand Down