-
Notifications
You must be signed in to change notification settings - Fork 70
74 lines (71 loc) · 2.18 KB
/
unittestagenda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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, macos-13]
ruby: [2.7]
# 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: runner.os != 'macOS'
- uses: actions/setup-node@v3
with:
node-version: 'v21.4.0' # works on macOS
- uses: actions/checkout@v4
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: show environ
run: |
node -v
npm -v
gem list
- name: test agenda code
run: |
cd www/board/agenda
# SKIP_NAVIGATION=1 bundle exec rake RSPEC_OPTS='--pattern=secret*.rb' || echo "action_state=failed" >> $GITHUB_ENV
SKIP_NAVIGATION=1 bundle exec rake || echo "action_state=failed" >> $GITHUB_ENV
continue-on-error: true
- name: Run Summary
run: |
npm list # added by Rakefile
echo "${{ env.action_state }}"
# This will be be true for a successful run
test "${{ env.action_state }}" != 'failed'