Merge/mastodon main branch #1336
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: E2E test for Creatodon Feature's | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
pull_request: | |
env: | |
BUNDLE_CLEAN: true | |
BUNDLE_FROZEN: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
redis: | |
image: valkey/valkey:8-alpine | |
ports: | |
- 6379:6379 | |
env: | |
DB_HOST: localhost | |
DB_USER: postgres | |
DB_PASS: postgres | |
DISABLE_SIMPLECOV: true | |
RAILS_ENV: test | |
ALLOW_NOPAM: true | |
BUNDLE_WITH: test | |
CI_JOBS: ${{ matrix.ci_job }}/4 | |
E2E: true | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- 'head' | |
ci_job: | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update Twitter theme submodules | |
run: git submodule update --init | |
- name: Install native Ruby dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libicu-dev libidn11-dev | |
- name: Install additional system dependencies | |
run: sudo apt-get install -y ffmpeg imagemagick libpam-dev | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version-file: '.nvmrc' | |
- run: yarn --frozen-lockfile | |
- name: Set up bundler cache | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version}} | |
bundler-cache: true | |
- name: Precompile assets | |
run: NODE_OPTIONS=--openssl-legacy-provider bundle exec rails assets:precompile | |
- name: Load database schema | |
run: 'bundle exec rails db:create db:schema:load db:seed' | |
- name: Load User data | |
run: bundle exec rails r db/seeds/e2e/user.rb | |
- name: Accept User | |
run: bin/tootctl accounts approve S_H_ | |
- name: Cypress run with env | |
run: bundle exec rake cypress:run | |
env: | |
CYPRESS_email: [email protected] | |
CYPRESS_password: MasterChief117 | |
CYPRESS_RAILS_HOST: localhost | |
CYPRESS_RAILS_PORT: 3000 | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |