diff --git a/.github/workflows/changelog_check.yml b/.github/workflows/changelog_check.yml new file mode 100644 index 00000000..7430af51 --- /dev/null +++ b/.github/workflows/changelog_check.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 00000000..36f4a8ae --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -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" \ No newline at end of file diff --git a/changelog.d/210.misc b/changelog.d/210.misc new file mode 100644 index 00000000..e4f74702 --- /dev/null +++ b/changelog.d/210.misc @@ -0,0 +1 @@ +Port CI checks to Github Actions.