mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -04:00
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: Run tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
# https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- name: Install deps
|
|
run: sudo apt-get install -y libidn11-dev
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install Mastodon
|
|
run: |
|
|
wget --no-verbose https://github.com/mastodon/mastodon/archive/refs/tags/v4.1.0.zip
|
|
unzip v4.1.0.zip
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.0.3'
|
|
bundler-cache: true
|
|
working-directory: 'mastodon-4.1.0'
|
|
- name: Setup database
|
|
run: |
|
|
cd mastodon-4.1.0
|
|
bundle exec rails db:setup
|
|
env:
|
|
RAILS_ENV: development
|
|
# with:
|
|
# working-directory: 'mastodon-4.1.0'
|
|
|
|
# - name: Run integration tests
|
|
# env:
|
|
# TOOT_TEST_HOSTNAME: localhost:3000
|
|
# TOOT_TEST_DATABASE_DSN: dbname=mastodon_development
|
|
|
|
# - name: Install dependencies
|
|
# run: |
|
|
# python -m pip install --upgrade pip
|
|
# pip install -e .
|
|
# pip install -r requirements-test.txt
|
|
# - name: Run tests
|
|
# run: |
|
|
# pytest
|
|
# - name: Validate minimum required version
|
|
# run: |
|
|
# vermin --target=3.6 --no-tips .
|
|
# - name: Check style
|
|
# run: |
|
|
# flake8
|