Temp debug #362
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit test library methods | |
| on: | |
| push: | |
| paths: | |
| - '**/unittestlib.yml' | |
| - 'lib/**' | |
| - 'repository.yml' | |
| workflow_dispatch: | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-13, ubuntu-24.04] | |
| ruby: [3.1, 3.2] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: setup non-macOS # needed for installing ruby-ldap | |
| if: ${{ runner.os != 'macOS' }} | |
| 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 | |
| - name: setup macos | |
| if: ${{ runner.os == 'macOS' }} | |
| run: | | |
| brew install subversion | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Fix LDAP version and install SVN if necessary | |
| run: | | |
| # Ruby 3.2+ has a changed API | |
| echo 'ruby-ldap3' > asfldap.gemname | |
| # SVN has been dropped from GH ubuntu 24.04 | |
| if ! command -v svn &> /dev/null | |
| then | |
| echo "Subversion (svn) is not installed. Installing..." | |
| sudo apt-get update && sudo apt-get install -y subversion | |
| fi | |
| - name: ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: test library code | |
| run: | | |
| cd lib | |
| bundle install | |
| bundle exec rake |