Skip to content

Commit

Permalink
Ported Buildkite checks to Github actions (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay authored Apr 13, 2021
1 parent 8d2dff0 commit 62bdfeb
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/changelog_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Name: Changelog
on: [pull_request]

jobs:
check-newsfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install towncrier
- run: python -m towncrier.check
64 changes: 64 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Linting and Tests
on: [push]
jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install tox
- run: tox -e check_codestyle

check-types-mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install tox
- run: tox -e check_types

run-unit-tests-sqlite:
needs: [check-code-style, check-types-mypy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install -e .
- run: trial tests

run-unit-tests-postgres:
needs: [check-code-style, check-types-mypy]
runs-on: ubuntu-latest

services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: "postgres"
POSTGRES_INITDB_ARGS: "--lc-collate C --lc-ctype C --encoding UTF8"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install -e .
- run: trial tests
env:
TEST_USE_POSTGRES: "yes"
TEST_POSTGRES_USER: "postgres"
TEST_POSTGRES_PASSWORD: "postgres"
TEST_POSTGRES_HOST: "localhost"
1 change: 1 addition & 0 deletions changelog.d/210.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port CI checks to Github Actions.

0 comments on commit 62bdfeb

Please sign in to comment.