mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
112 lines
2.9 KiB
YAML
112 lines
2.9 KiB
YAML
name: Run tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
test:
|
|
name: SQLite3
|
|
if: github.triggering_actor != 'allcontributors[bot]'
|
|
strategy:
|
|
fail-fast: false
|
|
runs-on: ubuntu-26.04
|
|
env:
|
|
RAILS_ENV: test
|
|
DATABASE_URL: sqlite3:/tmp/test.db
|
|
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/setup
|
|
- uses: ./.github/actions/test
|
|
- name: Upload Coverage
|
|
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
|
|
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage/coverage.xml
|
|
services:
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 6379:6379
|
|
|
|
test_postgres:
|
|
name: PostgreSQL
|
|
if: github.triggering_actor != 'allcontributors[bot]'
|
|
strategy:
|
|
fail-fast: false
|
|
runs-on: ubuntu-26.04
|
|
env:
|
|
RAILS_ENV: test
|
|
DATABASE_URL: postgresql://manyfold:manyfold@localhost:5432/manyfold
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/setup
|
|
- uses: ./.github/actions/test
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_USER: manyfold
|
|
POSTGRES_PASSWORD: manyfold
|
|
POSTGRES_DB: manyfold
|
|
options: >-
|
|
--health-cmd "pg_isready -d postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 6379:6379
|
|
|
|
test_mariadb:
|
|
name: MariaDB
|
|
if: github.triggering_actor != 'allcontributors[bot]'
|
|
strategy:
|
|
fail-fast: false
|
|
runs-on: ubuntu-26.04
|
|
env:
|
|
RAILS_ENV: test
|
|
DATABASE_URL: mysql2://manyfold:manyfold@127.0.0.1:3306/manyfold
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/setup
|
|
- uses: ./.github/actions/test
|
|
services:
|
|
mariadb:
|
|
image: mariadb
|
|
env:
|
|
MARIADB_USER: manyfold
|
|
MARIADB_PASSWORD: manyfold
|
|
MARIADB_DATABASE: manyfold
|
|
MARIADB_ROOT_PASSWORD: verysecret
|
|
options: >-
|
|
--health-cmd "healthcheck.sh --connect --innodb_initialized"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 3306:3306
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 6379:6379
|