name: Rails integration tests on: pull_request: push: branches: - v2 jobs: build-rails-5: name: Build Rails 5 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and cache uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile build-args: | RAILS_VERSION=5.2.8.1 MAIL_NOTIFY_BRANCH=${{ github.ref }} push: false tags: mail-notify-integration-rails-5:latest outputs: type=docker, dest=/tmp/rails-5-image.tar cache-from: type=gha cache-to: type=gha,mode=min - name: Upload artifact uses: actions/upload-artifact@v4 with: name: rails-5-image path: /tmp/rails-5-image.tar rails-5-previews: name: Rails 5 mailer previews runs-on: ubuntu-latest needs: build-rails-5 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-5-image path: /tmp - name: Load image run: docker load --input /tmp/rails-5-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-5:latest bin/rails test:system rails-5-sending: name: Rails 5 sending runs-on: ubuntu-latest needs: build-rails-5 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-5-image path: /tmp - name: Load image run: docker load --input /tmp/rails-5-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-5:latest bin/rails test build-rails-6: name: Build Rails 6 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and cache uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile build-args: | RAILS_VERSION=6.1.7.6 MAIL_NOTIFY_BRANCH=${{ github.ref }} push: false tags: mail-notify-integration-rails-6:latest outputs: type=docker, dest=/tmp/rails-6-image.tar cache-from: type=gha cache-to: type=gha,mode=min - name: Upload artifact uses: actions/upload-artifact@v4 with: name: rails-6-image path: /tmp/rails-6-image.tar rails-6-previews: name: Rails 6 mailer previews runs-on: ubuntu-latest needs: build-rails-6 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-6-image path: /tmp - name: Load image run: docker load --input /tmp/rails-6-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-6:latest bin/rails test:system rails-6-sending: name: Rails 6 sending runs-on: ubuntu-latest needs: build-rails-6 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-6-image path: /tmp - name: Load image run: docker load --input /tmp/rails-6-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-6:latest bin/rails test build-rails-7: name: Build Rails 7 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and cache uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile build-args: | RAILS_VERSION=7.1.3.2 MAIL_NOTIFY_BRANCH=${{ github.ref }} push: false tags: mail-notify-integration-rails-7:latest outputs: type=docker, dest=/tmp/rails-7-image.tar cache-from: type=gha cache-to: type=gha,mode=min - name: Upload artifact uses: actions/upload-artifact@v4 with: name: rails-7-image path: /tmp/rails-7-image.tar rails-7-previews: name: Rails 7 mailer previews runs-on: ubuntu-latest needs: build-rails-7 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-7-image path: /tmp - name: Load image run: docker load --input /tmp/rails-7-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-7:latest bin/rails test:system rails-7-sending: name: Rails 7 sending runs-on: ubuntu-latest needs: build-rails-7 steps: - name: Download image uses: actions/download-artifact@v4 with: name: rails-7-image path: /tmp - name: Load image run: docker load --input /tmp/rails-7-image.tar - name: Run integration tests env: NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} run: | docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \ mail-notify-integration-rails-7:latest bin/rails test