Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MJedr committed Oct 2, 2023
1 parent 49b7f1b commit 5bb1868
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test

on:
pull_request:
branches:
- main

jobs:
test:
strategy:
matrix:
directory:
- matomo
- notification-service
runs-on: ubuntu-latest
steps:
- name: Use the reusable workflow
uses: ./.github/workflows/reusable-workflow.yml
with:
directory: ${{ matrix.directory }}
35 changes: 35 additions & 0 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Reusable workflow

on:
workflow_call:
inputs:
directory:
required: true
type: string
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- uses: psf/black@stable
with:
src: ${{ inputs.directory }}/src
tests:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Test
run: pip install poetry && cd ${{ inputs.directory }} poetry install && poetry run pytest
2 changes: 1 addition & 1 deletion matomo-api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
description = ""
authors = ["MJedr <[email protected]>"]
packages = [
{ include = "*", from = "matomo" },
{ include = "*", from = "src" },
]

[tool.poetry.dependencies]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions matomo-api/tests/utils.py

This file was deleted.

0 comments on commit 5bb1868

Please sign in to comment.