Skip to content

Fix find_fragment timestamp predicate and add property-based tests #45

Fix find_fragment timestamp predicate and add property-based tests

Fix find_fragment timestamp predicate and add property-based tests #45

Workflow file for this run

name: S3 Integration
# This workflow tests `test/rabbitmq_stream_s3_api_aws_SUITE.erl` specifically.
# See the moduledoc in that file for more information about running manually.
# In addition to the steps there, these steps set up the secrets for use in
# environment variables in this repository:
#
# 1. Follow <https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/>
# to set up an OIDC Identity provider for GitHub Actions and attach a role with the same policy documented
# in the SUITE.
# 2. Go to <https://github.com/amazon-mq/rabbitmq-stream-s3/settings/secrets/actions> > New repository secret
# 3. Create a secret `AWS_ROLE_ARN` with the ARN from IAM > Roles > Role you created.
# 4. Create a secret `AWS_S3_BUCKET` with the bucket name.
# 5. Create a secret `AWS_REGION` with the region of where the bucket exists.
on:
workflow_dispatch:
pull_request:
paths:
- 'src/rabbitmq_stream_s3_api_aws.erl'
- 'test/rabbitmq_stream_s3_api_aws_SUITE.erl'
- '.github/workflows/s3-integration.yaml'
permissions:
id-token: write
contents: read
jobs:
s3-integration:
runs-on: ubuntu-latest
strategy:
matrix:
rmq-version: ['streams-tiered-storage']
include:
- rmq-version: 'streams-tiered-storage'
otp-version: 27
elixir-version: 1.18
steps:
- id: restore-rabbitmq-server-cache
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/rabbitmq-server
key: rmq-${{ matrix.rmq-version }}-otp-${{ matrix.otp-version }}-elixir-${{ matrix.elixir-version }}
- id: maybe-fail-rabbitmq-server-miss
if: steps.restore-rabbitmq-server-cache.outputs.cache-hit != 'true'
uses: actions/github-script@v8
with:
script: |
core.setFailed('could not restore cached rabbitmq-server build');
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp-version }}
elixir-version: ${{ matrix.elixir-version }}
- uses: actions/checkout@v5
with:
path: rabbitmq-server/deps/rabbitmq_stream_s3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6.0.0
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: make
run: make -C ${{ github.workspace }}/rabbitmq-server/deps/rabbitmq_stream_s3
- name: Integration tests
run: make -C ${{ github.workspace }}/rabbitmq-server/deps/rabbitmq_stream_s3 t=integration ct-rabbitmq_stream_s3_api_aws
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v6
with:
name: CommonTest logs
if-no-files-found: ignore
path: ${{ github.workspace }}/rabbitmq-server/logs/