Skip to content

Commit 144decd

Browse files
committed
update index file
2 parents 48bc130 + a351ed5 commit 144decd

File tree

6 files changed

+126
-19
lines changed

6 files changed

+126
-19
lines changed

.github/workflows/check.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,38 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Check out the repo
13-
uses: actions/checkout@v2
12+
- name: Checkout repo
13+
uses: actions/checkout@v3
1414

1515
- name: Setup project
16-
run: ./setup.sh
17-
18-
- name: Build the Docker Compose stack
16+
run: ./setup-testing-mode.sh
17+
18+
- name: Build Docker Compose stack
1919
run: docker compose up -d
2020

2121
- name: Sleep
22-
uses: jakejarvis/wait-action@master
23-
with:
24-
time: '60s'
22+
run: sleep 10s
23+
shell: bash
2524

2625
- name: Check running containers
2726
run: docker ps
27+
28+
- name: Run Cypress unit tests
29+
uses: cypress-io/github-action@v5
30+
with:
31+
install: false
32+
build: npm i -D cypress
33+
browser: firefox
34+
env:
35+
CYPRESS_VIDEO: false
36+
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'
37+
38+
- name: Store Cypress screenshots
39+
if: always()
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: screenshots
43+
path: cypress/screenshots
44+
45+
- name: Docker Compose logs
46+
run: docker compose logs

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ in your computer by going to the project folder and running:
4646

4747
```bash
4848
./setup-testing-mode.sh # setup files for testing and download Docker images
49-
docker compose --profile dev up -d # start services and RStudio in detached mode
49+
docker compose --profile dev up -d # start server in the `dev` profile and detached mode
5050
```
5151

5252
You can now visit http://localhost in your web browser. The services should be
5353
fully operational in about ~30 seconds. Specific services may only be accessible
5454
via their port, e.g. http://localhost:8000 for plausible and
5555
http://localhost:8787 for RStudio.
5656

57+
> [!NOTE]
58+
> Some services are only available in the `dev` profile (RStudio).
59+
5760
### Production environment
5861

5962
Some services are given a default email, user and/or password. The default ones
@@ -87,12 +90,16 @@ docker compose up -d # start services in detached mode
8790

8891
You can now visit http://localhost in your web browser.
8992

90-
> Some services are only available in the `dev` profile (RStudio). To
91-
> run this profile, type:
92-
> ```bash
93-
> docker compose --profile dev up -d
93+
> [!TIP]
94+
> If you are using a remote machine, [port forwarding][tunneling] allows to access
95+
> specific services in your browser. For instance, to access http://localhost:8000
96+
> (plausible) in your browser, you first need to connect to the machine like so:
97+
> ```
98+
> ssh -L 8000:localhost:8000 [server]
9499
> ```
95100
101+
[tunneling]: https://en.wikipedia.org/wiki/Port_forwarding
102+
96103
## Next steps
97104
98105
- [Add and update apps in ShinyProxy](shinyproxy)

cypress.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const { defineConfig } = require('cypress')
2+
3+
module.exports = defineConfig({
4+
// These settings apply everywhere unless overridden
5+
defaultCommandTimeout: 5000,
6+
viewportWidth: 1000,
7+
viewportHeight: 600,
8+
// Viewport settings overridden for component tests
9+
component: {
10+
viewportWidth: 500,
11+
viewportHeight: 500,
12+
},
13+
// Command timeout overridden for E2E tests
14+
e2e: {
15+
defaultCommandTimeout: 10000,
16+
baseUrl: 'http://localhost',
17+
},
18+
})

cypress/e2e/tests.cy.js

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
describe('ShinyProxy', () => {
2+
it('main', () => {
3+
cy.visit('/')
4+
cy.screenshot()
5+
cy.contains('psichomics')
6+
cy.contains('cTRAP')
7+
})
8+
9+
it('psichomics', () => {
10+
cy.visit('/psichomics')
11+
cy.wait(30000)
12+
cy.url().should('include', '/app/psichomics')
13+
cy.screenshot()
14+
})
15+
16+
it('cTRAP', () => {
17+
cy.visit('/cTRAP')
18+
cy.wait(30000)
19+
cy.url().should('include', '/app/cTRAP')
20+
cy.screenshot()
21+
})
22+
})
23+
24+
describe('Flower dashboard', () => {
25+
it('open', () => {
26+
cy.visit('http://localhost:5555/flower/dashboard')
27+
cy.screenshot()
28+
cy.contains('celery@ctrap').click()
29+
cy.screenshot()
30+
})
31+
})
32+
33+
describe('Grafana', () => {
34+
it('open', () => {
35+
cy.visit('http://localhost:3000')
36+
cy.screenshot()
37+
})
38+
})
39+
40+
describe('Prometheus', () => {
41+
it('open', () => {
42+
cy.visit('http://localhost:9090')
43+
cy.screenshot()
44+
})
45+
})
46+
47+
// Issues with setting up Plausible because of password issues :(
48+
// describe('Plausible', () => {
49+
// it('open', () => {
50+
// cy.visit('http://localhost:8000/login')
51+
// cy.screenshot()
52+
// })
53+
// })
54+
55+
describe('404', () => {
56+
it('open', () => {
57+
cy.request({url: '/404', failOnStatusCode: false}).its('status').should('equal', 404)
58+
cy.visit('/404', {failOnStatusCode: false})
59+
cy.screenshot()
60+
})
61+
})

cypress/support/e2e.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// DO NOT DELETE THIS FILE: required for Cypress to run unit tests

shinyproxy/templates/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ <h1> <b>
255255
Tutorial
256256
<a style="margin-right: 0em;" href="https://compbio.imm.medicina.ulisboa.pt/betas/tutorial">[1]</a>
257257
<a href="https://diseasetranscriptomicslab.github.io/betAS/inst/betAS_tutorial.html">[2]</a>
258+
258259
</p>
259260

260261
<!-- App Description -->
@@ -547,25 +548,25 @@ <h5><b> <a href = "https://hub.docker.com/r/nunoagostinho/rsem">rsem</a> </b></
547548
<div class="w3-xlarge w3-section">
548549
<!-- LOGOS -->
549550
<a href="https://imm.medicina.ulisboa.pt/pt-pt/" style="text-decoration: none;">
550-
<img src="assets/img/logos/imm.png" alt="" height="50px">
551+
<img target="_blank" src="assets/img/logos/imm.png" alt="" height="50px">
551552
</a>
552553
<a href="https://www.embo.org/funding/fellowships-grants-and-career-support/young-investigator-programme/" style="text-decoration: none;">
553-
<img src="assets/img/logos/embo2.png" alt="" height="50px">
554+
<img target="_blank" src="assets/img/logos/embo2.png" alt="" height="50px">
554555
</a>
555556

556557
<a href="https://www.fct.pt/index.phtml.en" style="text-decoration: none;">
557-
<img src="assets/img/logos/fct.png" alt="" height="50px">
558+
<img target="_blank" src="assets/img/logos/fct.png" alt="" height="50px">
558559
</a>
559560
<a href="https://ribomed.imm.medicina.ulisboa.pt/pt-pt/#homepage" style="text-decoration: none;">
560-
<img src="assets/img/logos/ribomed.png" alt="" height="50px">
561+
<img target="_blank" src="assets/img/logos/ribomed.png" alt="" height="50px">
561562
</a>
562563

563564
<a href="https://www.genomept.pt/" style="text-decoration: none;">
564-
<img src="assets/img/logos/genomept.png" alt="" height="50px">
565+
<img target="_blank" src="assets/img/logos/genomept.png" alt="" height="50px">
565566
</a>
566567

567568
<a href="https://imm.medicina.ulisboa.pt/bioinformaticsmatters/doku.php?id=start" style="text-decoration: none;">
568-
<img src="assets/img/logos/bm.png" alt="" height="50px">
569+
<img target="_blank" src="assets/img/logos/bm.png" alt="" height="50px">
569570
</a>
570571

571572

0 commit comments

Comments
 (0)