feat: add tests #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Continuous Integration' | |
on: | |
push: | |
branches: ['master'] | |
pull_request: | |
branches: ['master'] | |
workflow_call: | |
jobs: | |
push: | |
name: 'Run tests' | |
runs-on: 'ubuntu-latest' | |
permissions: | |
contents: 'read' | |
steps: | |
- name: 'Checkout code' | |
uses: 'actions/checkout@v4' | |
- name: 'Install Ruby dependencies' | |
uses: 'ruby/setup-ruby@v1' | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: 'Log in to the Container registry' | |
uses: 'docker/login-action@v3' | |
with: | |
username: '${{ secrets.REGISTRY_USERNAME }}' | |
password: '${{ secrets.REGISTRY_PASSWORD }}' | |
- name: 'Set up Docker Buildx' | |
uses: 'docker/setup-buildx-action@v3' | |
- name: 'Build' | |
uses: 'docker/build-push-action@v5' | |
with: | |
tags: 'jeanberu/mailcatcher:latest' | |
platforms: 'linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8' | |
cache-from: 'type=gha' | |
cache-to: 'type=gha,mode=max' | |
- name: 'Start mailcatcher' | |
run: 'docker run -d jeanberu/mailcatcher:latest' | |
- name: 'Run tests' | |
run: 'bundle exec rspec spec/*' |