1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00
Marius Balteanu c3460f5936 Simplify artifact name (#42688).
Patch by Katsuya HIDAKA (user:hidakatsuya).

git-svn-id: https://svn.redmine.org/redmine/trunk@23793 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-05-24 20:57:25 +00:00

104 lines
2.6 KiB
YAML

name: Tests
on:
push:
jobs:
tests:
name: test ${{matrix.db}} ruby-${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.2', '3.3', '3.4']
db: ['postgresql', 'mysql2', 'sqlite3']
fail-fast: false
services:
postgres:
image: postgres:13
env:
POSTGRES_DB: redmine_test
POSTGRES_USER: root
POSTGRES_PASSWORD: root
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: redmine_test
MYSQL_ROOT_PASSWORD: 'root'
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Redmine test environment
uses: ./.github/actions/setup-redmine
with:
db-type: ${{ matrix.db }}
ruby-version: ${{ matrix.ruby }}
- name: Run tests
run: |
bin/rails test
- name: Run bazaar non ascii test
env:
LANG: en_US.ISO8859-1
LC_ALL: en_US.ISO8859-1
run: |
bin/rails test test/unit/repository_bazaar_test.rb
- name: Run autoload test
run: |
bin/rails test:autoload
system-tests:
name: system test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Redmine test environment
uses: ./.github/actions/setup-redmine
with:
db-type: sqlite3
ruby-version: '3.4'
# System tests use Chrome and ChromeDriver installed on the GitHub Actions Ubuntu image.
# They are generally updated to the latest stable versions.
- name: Display Chrome version
run: google-chrome --version
- name: Run system tests
run: bin/rails test:system
env:
GOOGLE_CHROME_OPTS_ARGS: headless,disable-gpu,no-sandbox,disable-dev-shm-usage
# System tests might still be a bit unstable, so for now, even if a system test fails,
# output the results and consider the overall test as successful.
continue-on-error: true
- name: Upload system test screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: system-test-screenshots
path: tmp/screenshots
if-no-files-found: ignore