| name: Unit test navigation |
| # Separate job for debugging navigation issues |
| on: |
| 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] |
| ruby: [2.7] |
| runs-on: ${{ matrix.os }} |
| steps: |
| - name: setup Ubuntu missing header files |
| run: | |
| sudo apt-get install libldap2-dev |
| sudo apt-get install libsasl2-dev |
| sudo apt-get install libyaml-dev # psych 5.0.0 |
| if: matrix.os == 'ubuntu-20.04' |
| - uses: actions/setup-node@v3 |
| with: |
| node-version: '18.16.0' |
| # it seems that using the default Ubuntu version of node (14.19.0) |
| # somehow fails to set the correct path for rake to use |
| - uses: actions/checkout@v3 |
| with: |
| persist-credentials: false |
| - uses: ruby/setup-ruby@v1 |
| with: |
| ruby-version: ${{ matrix.ruby }} |
| bundler-cache: true |
| - name: Install Gems |
| run: | |
| cd www/board/agenda |
| bundle install |
| - name: Set up LDAP |
| run: | |
| # need to run the ruby that has all the gems installed |
| 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 navigation code |
| run: | |
| cd www/board/agenda |
| # --pattern does not work (appears to be overridden) |
| # so use exclude to drop all but the one we want |
| echo '--exclude-pattern spec/[a-mo-z]*_spec.rb' >.rspec |
| TEST_AO_PAGE=1 bundle exec rake |