mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
46 lines
No EOL
1.3 KiB
YAML
46 lines
No EOL
1.3 KiB
YAML
name: CI
|
|
on: [push, pull_request]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-22.04
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_DB: ci_test
|
|
POSTGRES_PASSWORD: citestpassword
|
|
# Set health checks to wait until postgres has started
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
# Maps tcp port 5432 on service container to the host
|
|
- 5432:5432
|
|
redis:
|
|
image: redis
|
|
# Set health checks to wait until redis has started
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
# Maps port 6379 on service container to the host
|
|
- 6379:6379
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: sudo apt-get update && sudo apt-get -y install libimlib2-dev chromium-browser
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.3'
|
|
bundler-cache: true
|
|
- name: Install dependencies
|
|
run: bundle install
|
|
- name: Run tests with Coveralls
|
|
env:
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
run: bundle exec rake |