Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mec committed Apr 5, 2024
1 parent b5b17fe commit 0731b81
Showing 1 changed file with 140 additions and 10 deletions.
150 changes: 140 additions & 10 deletions .github/workflows/rails-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- v2

jobs:
rails-5:
name: Rails 5 mailer previews
build-rails-5:
name: Build Rails 5
runs-on: ubuntu-latest
steps:
-
Expand All @@ -29,15 +29,62 @@ jobs:
push: false
load: true
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
rails-6:
name: Rails 6 mailer previews
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:
-
Expand All @@ -60,14 +107,58 @@ jobs:
tags: mail-notify-integration-rails-6:latest
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
run: \
docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \
mail-notify-integration-rails-6:latest bin/rails test:system

rails-7:
name: Rails 7 mailer previews
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:
-
Expand All @@ -89,9 +180,48 @@ jobs:
load: true
tags: mail-notify-integration-rails-7:latest
cache-from: type=gha
cache-to: type=gha,mode=min
cache-to: type=gha,mode=max

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
run: |
docker run --rm -e "NOTIFY_API_KEY=$NOTIFY_API_KEY" \
mail-notify-integration-rails-7:latest bin/rails test

0 comments on commit 0731b81

Please sign in to comment.