diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..f82e1f7 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,34 @@ +name: Run tests + +on: + pull_request: + branches: ['main'] # To main (direct commits, or merges from PRs). + workflow_dispatch: # allows manual run from GitHub UI + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Go Task + uses: arduino/setup-task@v2 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt + # pip install -r requirements-dev.txt + - name: Install dependencies + run: | + pip install -e .[dev] # -e means in editable mode, [dev] means also install the optional dependency group called dev + + - name: Run tests + run: task test diff --git a/README.md b/README.md index 3ef3bb0..be95f8d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# yini-parser-python from yini_parser import load diff --git a/pyproject.toml b/pyproject.toml index 9a826af..a1db638 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,5 +6,10 @@ dependencies = [ "antlr4-python3-runtime==4.13.2", ] +[project.optional-dependencies] +dev = [ + "pytest", +] + [tool.pytest.ini_options] pythonpath = ["src"] diff --git a/tests/fixtures/smoke-fixtures/7-email-smtp-configuration.smoke.json b/tests/fixtures/smoke-fixtures/7-email-smtp-configuration.smoke.json index e179f64..52f63da 100644 --- a/tests/fixtures/smoke-fixtures/7-email-smtp-configuration.smoke.json +++ b/tests/fixtures/smoke-fixtures/7-email-smtp-configuration.smoke.json @@ -8,7 +8,7 @@ "Defaults": { "from_address": "noreply@example.com", "reply_to": null, - "signature": "Kind regards,\r\n\tThe Example Team\r\n\t" + "signature": "Kind regards,\n\tThe Example Team\n\t" } } } \ No newline at end of file