Skip to content

fix messed up tailwind config #123

fix messed up tailwind config

fix messed up tailwind config #123

name: basic-foundation-test
on:
push:
branches:
- '*' # all branches
pull_request:
branches:
- main # PRs to the main branch
jobs:
install-migrate-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: api
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12.1"
- name: Bootstrap poetry
run: |
if [ ! -x "$(command -v poetry)" ]; then
curl -sSL https://install.python-poetry.org | python - -y
fi
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Create CI .env file
run: |
cp .env.ci .env
- name: Install dependencies
run: |
make install
- name: Run code formatting check
run: |
make format
git diff --exit-code || (echo "Code is not formatted correctly. Please run 'make format' and commit the changes." && exit 1)
- name: Run type checks
run: |
make type-check || (echo "Type check failed. Please fix the issues before committing." && exit 1)
- name: Run dbmate migrations
run: |
make migrate-up
- name: Run init data
run: |
make init-data
- name: Run foundation core tests
run: |
make test-foundation-core
- name: Run foundation api tests
run: |
make test-foundation-api
- name: Install Playwright and dependencies
run: |
POETRY_CACHE_DIR=~/.cache/pypoetry_cache
mkdir -p $POETRY_CACHE_DIR
poetry run playwright install --with-deps
- name: Start fastapi
run: |
make run &
for i in {1..5}; do
echo "Waiting for FastAPI to start... $i second(s)"
sleep 1
done
- name: Run Playwright tests
run: |
make test-foundation-web
- name: Upload Playwright Traces
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-traces
path: test-results/
- name: Run coverage check
run: |
make test-coverage > coverage.txt
echo "## Coverage Report" > coverage.md
echo "" >> coverage.md
echo "| Name | Statements | Missed | Branch | BrPart | Coverage | Missing |" >> coverage.md
echo "| ---- | ---------- | ------ | ------ | ------ | -------- | ------- |" >> coverage.md
tail -n +3 coverage.txt | sed -e 's/^|/||/;s/$/|/' | awk 'BEGIN{OFS="|"} {NF=NF + 1; $1=$1} 1' | sed 's/|/ | /g' >> coverage.md
- name: Display coverage report in job summary
run: cat coverage.md >> $GITHUB_STEP_SUMMARY
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}