Use scripts in workflow #354
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test with PostGIS | |
env: | |
PLUGIN_NAME: ${{ github.event.repository.name }} | |
on: | |
push: | |
branches: | |
- main | |
- next | |
pull_request: | |
branches: | |
- main | |
- next | |
workflow_dispatch: | |
jobs: | |
test: | |
name: redmine:${{ matrix.redmine_version }} ruby:${{ matrix.ruby_version }} postgis:${{ matrix.db_version }} | |
runs-on: ubuntu-22.04 | |
container: | |
image: ruby:${{ matrix.ruby_version }}-bullseye | |
strategy: | |
fail-fast: false | |
matrix: | |
redmine_version: [5.0-stable, 5.1-stable, master] | |
ruby_version: ['3.0', '3.1', '3.2'] | |
db_version: [12-3.0, 15-3.3] | |
include: | |
- system_test: true | |
redmine_version: 5.1-stable | |
ruby_version: '3.2' | |
exclude: | |
- redmine_version: 5.0-stable | |
ruby_version: '3.2' | |
- redmine_version: master | |
services: | |
postgres: | |
image: postgis/postgis:${{ matrix.db_version }} | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout Redmine | |
uses: actions/checkout@v4 | |
with: | |
repository: redmine/redmine | |
ref: ${{ matrix.redmine_version }} | |
path: redmine | |
- name: Checkout Plugin | |
uses: actions/checkout@v4 | |
with: | |
path: redmine/plugins/${{ env.PLUGIN_NAME }} | |
- name: Setup Environment | |
run: ./setup_environment.sh | |
- name: Prepare Plugin | |
working-directory: redmine/plugins/${{ env.PLUGIN_NAME }} | |
run: ./prepare_plugin.sh | |
- name: Prepare Redmine source | |
working-directory: redmine | |
run: ./prepare_redmine.sh | |
- name: Adjust Gem environment | |
run: ./adjust_gem_env.sh | |
- name: Install Ruby dependencies | |
working-directory: redmine | |
run: ./install_ruby_dependencies.sh | |
- name: Run Redmine rake tasks | |
env: | |
RAILS_ENV: test | |
working-directory: redmine | |
run: ./run_rake_tasks.sh | |
- name: Zeitwerk check | |
env: | |
RAILS_ENV: test | |
working-directory: redmine | |
run: ./zeitwerk_check.sh | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
GOOGLE_CHROME_OPTS_ARGS: "headless,disable-gpu,no-sandbox,disable-dev-shm-usage" | |
working-directory: redmine | |
run: ./run_tests.sh | |
- name: Run uninstall test | |
env: | |
RAILS_ENV: test | |
working-directory: redmine | |
run: ./run_uninstall_test.sh |