forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (90 loc) · 2.57 KB
/
test-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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 }}