Skip to content

Commit

Permalink
Actions: try disabling AppArmor
Browse files Browse the repository at this point in the history
(cherry picked from commit ba8d7a8)

# Conflicts:
#	.github/workflows/test-make-target.yaml
  • Loading branch information
michaelklishin authored and mergify[bot] committed Oct 14, 2024
1 parent 4bbe25e commit c53639a
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 4 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/test-make-target.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test target (make)
on:
workflow_call:
inputs:
erlang_version:
required: true
type: string
elixir_version:
required: true
type: string
metadata_store:
required: true
type: string
make_target:
required: true
type: string
plugin:
required: true
type: string
jobs:
test:
name: ${{ inputs.plugin }} (${{ inputs.make_target }})
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4

- name: FETCH TAGS
run: git fetch --tags

- name: SETUP OTP & ELIXIR
uses: erlef/[email protected]
with:
otp-version: ${{ inputs.erlang_version }}
elixir-version: ${{ inputs.elixir_version }}
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
# This currently only applies to Elixir; and can be safely
# restricted to the build jobs to avoid duplication in output.
disable_problem_matchers: true

- name: SETUP DOTNET (rabbit)
uses: actions/setup-dotnet@v4
if: inputs.plugin == 'rabbit'
with:
dotnet-version: '3.1.x'

- name: SETUP SLAPD (rabbitmq_auth_backend_ldap)
if: inputs.plugin == 'rabbitmq_auth_backend_ldap'
run: |
sudo apt-get update && \
sudo apt-get install -y \
ldap-utils \
slapd
sudo service apparmor stop
- name: RUN TESTS
if: inputs.plugin != 'rabbitmq_cli'
run: |
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
# rabbitmq_cli needs a correct broker version for two of its tests.
# But setting PROJECT_VERSION makes other plugins fail.
- name: RUN TESTS (rabbitmq_cli)
if: inputs.plugin == 'rabbitmq_cli'
run: |
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} PROJECT_VERSION="4.1.0"
- name: UPLOAD TEST LOGS
if: always()
uses: actions/upload-artifact@v4
with:
name: CT logs (${{ inputs.plugin }} ${{ inputs.make_target }} OTP-${{ inputs.erlang_version }} ${{ inputs.metadata_store }})
path: |
logs/
!logs/**/log_private
if-no-files-found: ignore
3 changes: 1 addition & 2 deletions .github/workflows/test-plugin-mixed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ jobs:
run: |
sudo apt-get update && \
sudo apt-get install -y \
apparmor-utils \
ldap-utils \
slapd
sudo aa-complain `which slapd`
sudo service apparmor stop
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ jobs:
run: |
sudo apt-get update && \
sudo apt-get install -y \
apparmor-utils \
ldap-utils \
slapd
sudo aa-complain `which slapd`
sudo service apparmor stop
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
Expand Down

0 comments on commit c53639a

Please sign in to comment.