Add an end-to-end test for adding metadata to transcodes #462
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: CI | |
on: [push] | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup dummy application environment using dotenv | |
run: cp .env.example .env.test | |
- name: Run linters | |
env: | |
RAILS_ENV: test | |
run: | | |
bin/rails rubocop | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15-alpine | |
env: | |
POSTGRES_USER: myapp | |
POSTGRES_DB: myapp_test | |
POSTGRES_PASSWORD: password | |
ports: ["5432:5432"] | |
steps: | |
- name: Updates package index files | |
run: sudo apt-get update | |
- name: Install libvips | |
run: sudo apt-get install -y libvips | |
- name: Install ffmpeg | |
run: sudo apt-get install -y ffmpeg | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup dummy application environment using dotenv | |
run: cp .env.example .env.test | |
- name: Setup test database | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: myapp | |
PGPASSWORD: password | |
run: | | |
bin/rails db:setup | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: myapp | |
PGPASSWORD: password | |
run: bin/rails test:all |