toot/.github/workflows/test.yml

67 wiersze
1.8 KiB
YAML
Czysty Zwykły widok Historia

2022-12-02 08:00:25 +00:00
name: Run tests
2023-01-01 10:11:10 +00:00
on: [push, pull_request]
2022-12-02 08:00:25 +00:00
jobs:
2023-01-01 10:11:10 +00:00
test:
2023-03-08 13:46:17 +00:00
runs-on: ubuntu-latest
2023-03-08 13:17:06 +00:00
# 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
2023-03-08 14:03:37 +00:00
ports:
- 5432:5432
2022-12-02 08:00:25 +00:00
steps:
2023-03-08 13:51:26 +00:00
- name: Install deps
run: sudo apt-get install -y libidn11-dev
2022-12-02 08:00:25 +00:00
- uses: actions/checkout@v3
2023-03-08 13:46:17 +00:00
- uses: actions/setup-python@v4
2022-12-02 08:00:25 +00:00
with:
2023-03-08 13:46:17 +00:00
python-version: '3.10'
2023-03-08 13:17:06 +00:00
- name: Install Mastodon
run: |
2023-03-08 13:46:17 +00:00
wget --no-verbose https://github.com/mastodon/mastodon/archive/refs/tags/v4.1.0.zip
2023-03-08 13:17:06 +00:00
unzip v4.1.0.zip
2023-03-08 13:46:17 +00:00
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.3'
bundler-cache: true
working-directory: 'mastodon-4.1.0'
- name: Setup database
run: |
2023-03-08 14:00:00 +00:00
cd mastodon-4.1.0
bundle exec rails db:setup
env:
RAILS_ENV: development
# with:
# working-directory: 'mastodon-4.1.0'
2023-03-08 13:46:17 +00:00
2023-03-08 13:17:34 +00:00
# - name: Run integration tests
# env:
# TOOT_TEST_HOSTNAME: localhost:3000
# TOOT_TEST_DATABASE_DSN: dbname=mastodon_development
2023-03-08 13:17:06 +00:00
# - 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