Skip to content

Commit

Permalink
Test the service on pull request and merge to main (microsoft#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
markwaddle authored Sep 30, 2024
1 parent f6daf3c commit ffada6f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/semantic-workbench-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: semantic workbench service validation

on:
pull_request:
branches: ["main"]
paths:
[
".github/workflows/semantic-workbench-service.yml",
"semantic-workbench/v1/service/semantic-workbench-service/**",
]

push:
branches: ["main"]
paths:
[
".github/workflows/semantic-workbench-service.yml",
"semantic-workbench/v1/service/semantic-workbench-service/**",
]

workflow_dispatch:

defaults:
run:
working-directory: semantic-workbench/v1/service/semantic-workbench-service

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.7.1"]
dbtype: ["sqlite", "postgresql"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Install package
run: |
poetry install
- name: pytest
run: |
poetry run pytest --dbtype=${{ matrix.dbtype }}

0 comments on commit ffada6f

Please sign in to comment.