Skip to content

Use a single query #208

Use a single query

Use a single query #208

name: Unit test agenda
on:
push:
paths:
- '**/unittestagenda.yml'
- 'www/board/agenda/**'
- 'lib/**'
workflow_dispatch:
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
ruby: [2.7, 3.1]
# 2.7 not supported on 22.04
exclude:
- os: ubuntu-22.04
ruby: 2.7
runs-on: ${{ matrix.os }}
steps:
- name: setup Ubuntu missing header files
run: |
sudo apt-get update
sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev
sudo apt-get install libyaml-dev # seems to be needed for installing ruby since psych 5.0.0 release
if: matrix.os != 'macos-latest'
- uses: actions/setup-node@v2
with:
node-version: '14.19.1'
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: setup agenda 1
run: |
cd www/board/agenda
bundle install
- name: setup agenda 2
# need to run the ruby that has all the gems installed
run: |
sudo mkdir -p /srv
sudo bash -c 'printf "\n\n\n" >/srv/ldap.txt'
ls -l /srv
echo ":ldap: ldaps://ldap-us.apache.org:636" >> .whimsy
sudo $(which ruby) -I $PWD/lib -r whimsy/asf -e "ASF::LDAP.configure"
- name: test agenda code
run: |
cd www/board/agenda
SKIP_NAVIGATION=1 bundle exec rake