Skip to content

Merge pull request #59 from Intsights/PD-41096-add-cortex-yaml #302

Merge pull request #59 from Intsights/PD-41096-add-cortex-yaml

Merge pull request #59 from Intsights/PD-41096-add-cortex-yaml #302

Workflow file for this run

name: Build
on:
- push
- pull_request
jobs:
lint:
if: github.event_name == 'push' && !startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Flake8 & mypy
run: python -m pip install --upgrade flake8-intsights mypy;
- name: Check Flake8 Linting Errors
if: "!contains(github.event.head_commit.message, 'skip flake8')"
run: flake8
- name: Check mypy Linting Errors
if: "!contains(github.event.head_commit.message, 'skip mypy')"
run: mypy --install-types --non-interactive --ignore-missing-imports -p sergeant
test:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
os:
- ubuntu-latest
services:
redis-node-one:
image: redis
ports:
- '6379:6379'
redis-node-two:
image: redis
ports:
- '6380:6379'
mongo-node-one:
image: 'bitnami/mongodb:latest'
ports:
- '27017:27017'
env:
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: test_replica_set_one
MONGODB_PORT_NUMBER: 27017
ALLOW_EMPTY_PASSWORD: yes
MONGODB_ADVERTISED_HOSTNAME: localhost
mongo-node-two:
image: 'bitnami/mongodb:latest'
ports:
- '27018:27018'
env:
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: test_replica_set_two
MONGODB_PORT_NUMBER: 27018
ALLOW_EMPTY_PASSWORD: yes
MONGODB_ADVERTISED_HOSTNAME: localhost
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Test
run: poetry run pytest