-
-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (61 loc) · 1.97 KB
/
Copy pathsystem-tests.yml
File metadata and controls
65 lines (61 loc) · 1.97 KB
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
name: System tests
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
branches:
- "master"
workflow_dispatch:
jobs:
system-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Build docker image"
run: make docker_build
- name: "Run docker compose"
run: "make deploy_bg PORT=9292"
env:
FA_COOKIE: ${{ secrets.TEST_COOKIE }}
PROMETHEUS_PASS: "example_prom_pass"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- name: Install dependencies
run: bundle install
- name: "Run system tests"
run: bundle exec "rspec spec tests/system_spec.rb"
env:
server_url: "http://localhost:9292"
test_cookie: ${{ secrets.TEST_COOKIE}}
test_cookie_user_2: ${{ secrets.COOKIE_FAFEED_2 }}
static-scrape-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Build docker image"
run: make docker_build
- name: "Set docker compose to host network"
run: >
sed -i '/${PORT/d' docker-compose.yml;
sed -i 's/ports:/network_mode: \"host\"/' docker-compose.yml;
sed -i 's/redis_container:6379/localhost:6379/' docker-compose.yml;
sed -i '10i \ \ \ \ \ \ - CF_BYPASS=http://localhost:3000' docker-compose.yml;
sed -i '16i \ \ \ \ network_mode: \"host\"' docker-compose.yml;
- name: "Run docker compose"
run: "make deploy_bg PORT=9292"
env:
FA_COOKIE: ${{ secrets.TEST_COOKIE }}
APP_ENV: "production"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- name: Install dependencies
run: bundle install
- name: "Run system tests with mock responses"
run: bundle exec "rspec spec tests/mock_system_spec.rb"
env:
server_url: "http://localhost:9292"