-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure development- and deployment-related configs and assets
- Loading branch information
Showing
23 changed files
with
476 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,65 @@ | ||
name: Run Server Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
- main | ||
paths: | ||
- "Tekst-API/tekst/**" | ||
- "Tekst-API/tests/**" | ||
- "Tekst-API/pyproject.toml" | ||
- "Tekst-API/uv.lock" | ||
- ".github/workflows/server-tests.yml" | ||
pull_request: | ||
branches: | ||
- development | ||
paths: | ||
- "Tekst-API/tekst/**" | ||
- "Tekst-API/tests/**" | ||
- "Tekst-API/pyproject.toml" | ||
- "Tekst-API/uv.lock" | ||
- ".github/workflows/server-tests.yml" | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- development | ||
- main | ||
paths: | ||
- "Tekst-API/tekst/**" | ||
- "Tekst-API/tests/**" | ||
- "Tekst-API/pyproject.toml" | ||
- "Tekst-API/uv.lock" | ||
- ".github/workflows/server-tests.yml" | ||
pull_request: | ||
branches: | ||
- development | ||
paths: | ||
- "Tekst-API/tekst/**" | ||
- "Tekst-API/tests/**" | ||
- "Tekst-API/pyproject.toml" | ||
- "Tekst-API/uv.lock" | ||
- ".github/workflows/server-tests.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./Tekst-API | ||
defaults: | ||
run: | ||
working-directory: ./Tekst-API | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
version: "0.5.7" | ||
enable-cache: true | ||
cache-dependency-glob: "./Tekst-API/uv.lock" | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "./Tekst-API/pyproject.toml" | ||
- name: Install dependencies | ||
run: uv sync | ||
- name: Configure sysctl limits for ES | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
- name: Start test service stack | ||
run: | | ||
docker compose -f dev/compose.yml --profile test -p tekst-testing up --detach | ||
printf "Waiting for MongoDB service"; while ! $(curl -f http://127.0.0.1:27017 > /dev/null 2>&1); do sleep 1; printf "."; done; printf "\n" | ||
printf "Waiting for Elasticsearch service"; while ! $(curl -f http://127.0.0.1:9200 > /dev/null 2>&1); do sleep 1; printf "."; done; printf "\n" | ||
- name: Cancel on setup error | ||
if: failure() | ||
uses: andymckay/[email protected] | ||
- name: Run tests | ||
if: always() | ||
run: TEKST_DEV_MODE=true TEKST_CUSTOM_ENV_FILE=.env.test TEKST_EMAIL__SMTP_STARTTLS=false uv run coverage run -m pytest && uv run coverage lcov | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
version: "0.5.7" | ||
enable-cache: true | ||
cache-dependency-glob: "./Tekst-API/uv.lock" | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "./Tekst-API/pyproject.toml" | ||
- name: Install dependencies | ||
run: uv sync | ||
- name: Configure sysctl limits for ES | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
- name: Start test service stack | ||
run: | | ||
docker compose -f ../dev/compose.yml --profile test -p tekst-testing up --detach | ||
printf "Waiting for MongoDB service"; while ! $(curl -f http://127.0.0.1:27017 > /dev/null 2>&1); do sleep 1; printf "."; done; printf "\n" | ||
printf "Waiting for Elasticsearch service"; while ! $(curl -f http://127.0.0.1:9200 > /dev/null 2>&1); do sleep 1; printf "."; done; printf "\n" | ||
- name: Cancel on setup error | ||
if: failure() | ||
uses: andymckay/[email protected] | ||
- name: Run tests | ||
if: always() | ||
run: TEKST_DEV_MODE=true TEKST_CUSTOM_ENV_FILE=.env.test TEKST_EMAIL__SMTP_STARTTLS=false uv run coverage run -m pytest && uv run coverage lcov | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.