Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Sep 18, 2024
1 parent dfd5299 commit 521843f
Showing 1 changed file with 120 additions and 127 deletions.
247 changes: 120 additions & 127 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Passenger CI tests
env:
DEFAULT_RUBY_VERSION: 3.1.6
COMPILE_CONCURRENCY: 4
BUNDLE_CLEAN: true

on:
push: {}
Expand All @@ -14,139 +15,131 @@ jobs:
strategy:
fail-fast: false
matrix:
user:
- root
- 'normal-user'
os:
- macos-latest
- ubuntu-latest
exclude:
- os: macos-latest
user: 'root'
runs-on: ${{ matrix.os }}
env:
SUDO: ${{ matrix.user == 'root' && 1 || 0 }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
bundler-cache: true
- run: ./dev/ci/setup-host cxx
- run: ./dev/ci/run-tests-with-docker cxx
if: matrix.os == 'ubuntu-latest'
- run: ./dev/ci/run-tests-natively cxx
if: matrix.os == 'macos-latest'
- run: ls -R buildout
- uses: actions/upload-artifact@v4
with:
name: cxx-${{ matrix.os }}-${{ matrix.user }}
path: 'buildout/testlogs/*'
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
bundler-cache: true
- run: bundle exec rake test:install_deps BASE_DEPS=yes
env:
SUDO: '1'
- run: bundle exec rake -j2 test:cxx
env:
SUDO: '1'
- uses: actions/upload-artifact@v4
with:
name: cxx-${{ matrix.os }}
path: 'buildout/testlogs/*'

integration:
name: '${{ matrix.integration.name }} integration tests on ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
integration:
- name: 'Apache 2'
label: 'apache2'
- name: 'Nginx dynamic module'
label: 'nginx-dynamic'
- name: 'Nginx'
label: 'nginx'
- name: 'Standalone'
label: 'standalone'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
bundler-cache: true
- run: ./dev/ci/setup-host ${{ matrix.integration.label }}
- run: ./dev/ci/run-tests-with-docker ${{ matrix.integration.label }}
if: matrix.os == 'ubuntu-latest'
- run: ./dev/ci/run-tests-natively ${{ matrix.integration.label }}
if: matrix.os == 'macos-latest'
- run: ls -R buildout
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.integration.label }}-${{ matrix.os }}
path: 'buildout/testlogs/*'
# integration:
# name: '${{ matrix.integration.name }} integration tests on ${{ matrix.os }}'
# strategy:
# fail-fast: false
# matrix:
# os:
# - macos-latest
# - ubuntu-latest
# integration:
# - name: 'Apache 2'
# label: 'apache2'
# - name: 'Nginx dynamic module'
# label: 'nginx-dynamic'
# - name: 'Nginx'
# label: 'nginx'
# - name: 'Standalone'
# label: 'standalone'
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
# bundler-cache: true
# - run: ./dev/ci/setup-host ${{ matrix.integration.label }}
# - run: ./dev/ci/run-tests-with-docker ${{ matrix.integration.label }}
# if: matrix.os == 'ubuntu-latest'
# - run: ./dev/ci/run-tests-natively ${{ matrix.integration.label }}
# if: matrix.os == 'macos-latest'
# - run: ls -R buildout
# - uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.integration.label }}-${{ matrix.os }}
# path: 'buildout/testlogs/*'

language:
name: '${{ matrix.lang.name }} unit tests on ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
lang:
- name: 'Node.js'
label: 'nodejs'
- name: 'Ruby'
label: 'ruby'
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
bundler-cache: true
- run: ./dev/ci/setup-host ${{ matrix.lang.label }}
- run: ./dev/ci/run-tests-with-docker ${{ matrix.lang.label }}
if: matrix.os == 'ubuntu-latest'
- run: ./dev/ci/run-tests-natively ${{ matrix.lang.label }}
if: matrix.os == 'macos-latest'
- run: ls -R buildout
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.lang.label }}-${{ matrix.os }}
path: 'buildout/testlogs/*'
# language:
# name: '${{ matrix.lang.name }} unit tests on ${{ matrix.os }}'
# strategy:
# fail-fast: false
# matrix:
# lang:
# - name: 'Node.js'
# label: 'nodejs'
# - name: 'Ruby'
# label: 'ruby'
# os:
# - macos-latest
# - ubuntu-latest
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
# bundler-cache: true
# - run: ./dev/ci/setup-host ${{ matrix.lang.label }}
# - run: ./dev/ci/run-tests-with-docker ${{ matrix.lang.label }}
# if: matrix.os == 'ubuntu-latest'
# - run: ./dev/ci/run-tests-natively ${{ matrix.lang.label }}
# if: matrix.os == 'macos-latest'
# - run: ls -R buildout
# - uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.lang.label }}-${{ matrix.os }}
# path: 'buildout/testlogs/*'

homebrew_packaging:
name: 'Homebrew packaging unit tests'
runs-on: macos-latest
env:
GEM_HOME: ${{ github.workspace }}/.gem
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: ./dev/ci/setup-host homebrew-packaging
- run: ./dev/ci/run-tests-natively homebrew-packaging
- run: ls -R buildout
- uses: actions/upload-artifact@v4
with:
name: homebrew-${{ matrix.os }}
path: 'buildout/testlogs/*'
# homebrew_packaging:
# name: 'Homebrew packaging unit tests'
# runs-on: macos-latest
# env:
# GEM_HOME: ${{ github.workspace }}/.gem
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - run: ./dev/ci/setup-host homebrew-packaging
# - run: ./dev/ci/run-tests-natively homebrew-packaging
# - run: ls -R buildout
# - uses: actions/upload-artifact@v4
# with:
# name: homebrew-${{ matrix.os }}
# path: 'buildout/testlogs/*'

source_packaging:
name: 'Source packaging unit tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
bundler-cache: true
- run: ./dev/ci/setup-host source-packaging
- run: ./dev/ci/run-tests-with-docker source-packaging
- run: ls -R buildout
- uses: actions/upload-artifact@v4
with:
name: source-packaging-${{ matrix.os }}
path: 'buildout/testlogs/*'
# source_packaging:
# name: 'Source packaging unit tests'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: ${{ env.DEFAULT_RUBY_VERSION }}
# bundler-cache: true
# - run: ./dev/ci/setup-host source-packaging
# - run: ./dev/ci/run-tests-with-docker source-packaging
# - run: ls -R buildout
# - uses: actions/upload-artifact@v4
# with:
# name: source-packaging-${{ matrix.os }}
# path: 'buildout/testlogs/*'

0 comments on commit 521843f

Please sign in to comment.