Skip to content

Fix #require_login - return true when user is logged #80

Fix #require_login - return true when user is logged

Fix #require_login - return true when user is logged #80

Workflow file for this run

name: "Redmine OIDC: CI/CD"
on:
push:
branches:
- master
- ci/**
- work-in-progress
pull_request:
jobs:
pipeline:
name: Pipeline
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# We test against the latest Redmine stable and the master versions
redmine:
- '4.2-stable'
- '5.0-stable'
ruby:
- '2.7'
- '3.1'
exclude:
- { redmine: '4.2-stable', ruby: '3.1' }
steps:
# We checkout Redmine itself, since plugins can only be tested inside a running Redmine
# installation.
- name: Checkout Redmine ${{ matrix.redmine }}
uses: actions/checkout@v3
with:
repository: redmine/redmine
ref: ${{ matrix.redmine }}
# Checkout the actual plugin to the plugin path.
- name: Checkout Redmine OIDC Plugin
uses: actions/checkout@v3
with:
path: plugins/redmine_oidc
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# Recreate caches between CI/CD iterations
- name: Recreate Ruby Bundler cache
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ hashFiles('**/Gemfile*') }}
restore-keys: |
${{ runner.os }}-bundler-
# We run our test against the SQLite3 database. Since Redmine installs
# adapters according to database configuration, we provide our own CI/CD
# database configuration.
- name: Install test database dependencies (SQLite3)
run: sudo apt-get update -y && sudo apt-get install -y libsqlite3-dev
- name: Set test database configuration
run: cp plugins/redmine_oidc/.github/workflows/ci/config/database.yml config/database.yml
# Install all bundler dependencies.
- name: Install dependencies
run: bundle install --path ./vendor/bundle
# Run plugin tests.
- name: Run tests
run: bundle exec rails db:migrate redmine:plugins:test