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.head_ref }}
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install towncrier
- run: python -m towncrier.check --compare-with=${{ github.base_ref }}
49 changes: 49 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Linting and tests
on:
pull_request:
push:
branches: ["main"]
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:
needs: [check-code-style]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.x']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -e .
- run: trial tests

run-matrix-is-tests:
needs: [check-code-style]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.x']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- 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.
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.2",
"black==21.5b1",
],
# make sure we package the sql files
include_package_data=True,
Expand Down