Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikbruechner committed Feb 9, 2022
2 parents 6daad8e + 29d7684 commit 3727eca
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 45 deletions.
35 changes: 4 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
push:
branches:
- master
- develop
- develop-2
pull_request:
branches:
- master
- develop
- develop-2

jobs:
ci:
Expand Down Expand Up @@ -48,34 +52,3 @@ jobs:
run: npx codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

gh-pages-deploy:
runs-on: ${{ matrix.os }}
needs: [ci]

strategy:
matrix:
os: [ubuntu-latest]
node: [16]

steps:
- name: Checkout 🛎
uses: actions/checkout@master

- name: Install dependencies 👨🏻‍💻
run: npm ci --prefer-offline --no-audit

- name: Github Pages Build
run: npm run generate:gh-pages
env:
REST_API_URL: ${{ secrets.REST_API_URL }}
SCIENTIFIC_SERVICE_URL: ${{ secrets.SCIENTIFIC_SERVICE_URL }}
OEB_LEGACY_ANGULAR_URI: ${{ secrets.OEB_LEGACY_ANGULAR_URI }}
VRE_URI: ${{ secrets.VRE_URI }}
OBSERVATORY_URI: ${{ secrets.OBSERVATORY_URI }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
40 changes: 40 additions & 0 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: GitHub Pages Deploy

on:
push:
branches:
- develop-2
pull_request:
branches:
- develop-2

jobs:
gh-pages-deploy:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [16]

steps:
- name: Checkout 🛎
uses: actions/checkout@master

- name: Install dependencies 👨🏻‍💻
run: npm ci --prefer-offline --no-audit

- name: Github Pages Build
run: npm run generate:gh-pages
env:
REST_API_URL: ${{ secrets.REST_API_URL }}
SCIENTIFIC_SERVICE_URL: ${{ secrets.SCIENTIFIC_SERVICE_URL }}
OEB_LEGACY_ANGULAR_URI: ${{ secrets.OEB_LEGACY_ANGULAR_URI }}
VRE_URI: ${{ secrets.VRE_URI }}
OBSERVATORY_URI: ${{ secrets.OBSERVATORY_URI }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
4 changes: 2 additions & 2 deletions components/Header/menuEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
const menuEntries = [
{
title: 'Benchmarking',
to: '/communities',
to: '/scientific',
},
{
title: 'Tools',
to: '/tools',
to: '/tool',
},
{
title: 'Stats',
Expand Down
4 changes: 2 additions & 2 deletions components/Landing/FeatureTeaser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Explore benchmarks of the scientific performance of bioinformatics
methods
</p>
<v-btn text color="primary" to="/communities"> Learn More </v-btn>
<v-btn text color="primary" to="/scientific"> Learn More </v-btn>
</v-col>
<v-col align="center" cols="12" md="4" class="mt-10 mt-md-0">
<v-avatar color="primary" size="62" class="mb-10">
Expand All @@ -23,7 +23,7 @@
Individually browse metrics of bioinformatics tools, server and
workflows
</p>
<v-btn text color="primary" to="/tools"> Learn More </v-btn>
<v-btn text color="primary" to="/tool"> Learn More </v-btn>
</v-col>
<v-col align="center" cols="12" md="4" class="mt-10 mt-md-0">
<v-avatar color="primary" size="62" class="mb-10">
Expand Down
6 changes: 3 additions & 3 deletions components/Landing/HeroSearchbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('HeroSearchbar', () => {
submitBtn.trigger('click');

expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
path: 'tools',
path: '/tool',
query: { search: '' },
});
});
Expand All @@ -43,7 +43,7 @@ describe('HeroSearchbar', () => {
await searchInput.trigger('keyup.enter');

expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
path: 'tools',
path: '/tool',
query: { search: '' },
});
});
Expand All @@ -61,7 +61,7 @@ describe('HeroSearchbar', () => {
submitBtn.trigger('click');

expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
path: 'tools',
path: '/tool',
query: { search: 'Random Tool Name' },
});
});
Expand Down
2 changes: 1 addition & 1 deletion components/Landing/HeroSearchbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
methods: {
handleSubmit() {
this.$router.push({
path: 'tools',
path: '/tool',
query: { search: this.input },
});
},
Expand Down
4 changes: 2 additions & 2 deletions components/Landing/WelcomeSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
As a Researcher I want to search for benchmarking communities and
results
</p>
<v-btn color="primary" class="mt-10" large block to="communities">
<v-btn color="primary" class="mt-10" large block to="/scientific">
Scientific Benchmarking
</v-btn>
</v-col>
Expand All @@ -28,7 +28,7 @@
As a Developer I want to learn how to develop sustainable research
tools
</p>
<v-btn color="accent" class="mt-10" large block to="observatory">
<v-btn color="accent" class="mt-10" large block to="/observatory">
Tools Observatory
</v-btn>
</v-col>
Expand Down
10 changes: 10 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,14 @@ export default {

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},

router: {
extendRoutes(routes, resolve) {
routes.push({
name: 'dashboard',
path: '/dashboard',
component: resolve(__dirname, 'pages/index.vue'),
});
},
},
};
27 changes: 27 additions & 0 deletions pages/scientific/_community/_id.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { mount } from '@vue/test-utils';
import Community from './_id.vue';

const factory = () => {
return mount(Community, {
...createComponentMocks({}),
mocks: {
$route: { params: { community: 'TESTCOMMUNITY', id: 'TESTID' } },
$config: { OEB_LEGACY_ANGULAR_URI: 'https://jest-openebench.bsc.es/' },
},
});
};

describe('Community Participant', () => {
it('is instantiated', () => {
const wrapper = factory();
expect(wrapper).toBeTruthy();
});

it('sets the iframe url according to env variable', () => {
const wrapper = factory();
expect(wrapper.vm.hostName).toBe('https://jest-openebench.bsc.es/');
expect(wrapper.find('iframe').attributes('src')).toBe(
'https://jest-openebench.bsc.es/scientific/TESTCOMMUNITY/TESTID'
);
});
});
28 changes: 28 additions & 0 deletions pages/scientific/_community/_id.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<iframe
:src="
hostName +
`scientific/` +
$route.params.community +
`/` +
$route.params.id
"
width="100%"
height="100%"
frameborder="0"
class="mt-5"
>
</iframe>
</template>

<script>
export default {
name: 'ScientificBenchmarkingPage',
layout: 'embedIframeFullWidth',
data() {
return {
hostName: this.$config.OEB_LEGACY_ANGULAR_URI,
};
},
};
</script>
27 changes: 27 additions & 0 deletions pages/scientific/_community/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { mount } from '@vue/test-utils';
import Community from './index.vue';

const factory = () => {
return mount(Community, {
...createComponentMocks({}),
mocks: {
$route: { params: { community: 'TESTID' } },
$config: { OEB_LEGACY_ANGULAR_URI: 'https://jest-openebench.bsc.es/' },
},
});
};

describe('Community', () => {
it('is instantiated', () => {
const wrapper = factory();
expect(wrapper).toBeTruthy();
});

it('sets the iframe url according to env variable', () => {
const wrapper = factory();
expect(wrapper.vm.hostName).toBe('https://jest-openebench.bsc.es/');
expect(wrapper.find('iframe').attributes('src')).toBe(
'https://jest-openebench.bsc.es/scientific/TESTID'
);
});
});
22 changes: 22 additions & 0 deletions pages/scientific/_community/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<iframe
:src="hostName + `scientific/` + $route.params.community"
width="100%"
height="100%"
frameborder="0"
class="mt-5"
>
</iframe>
</template>

<script>
export default {
name: 'ScientificBenchmarkingPage',
layout: 'embedIframeFullWidth',
data() {
return {
hostName: this.$config.OEB_LEGACY_ANGULAR_URI,
};
},
};
</script>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from '@vue/test-utils';
import Communities from './communities.vue';
import Communities from './index.vue';

const factory = () => {
return mount(Communities, {
Expand Down
3 changes: 2 additions & 1 deletion pages/communities.vue → pages/scientific/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
width="100%"
height="100%"
frameborder="0"
class="mt-5"
>
</iframe>
</template>

<script>
export default {
name: 'ScientificBenchmarkingPage',
layout: 'embedIframe',
layout: 'embedIframeFullWidth',
data() {
return {
hostName: this.$config.OEB_LEGACY_ANGULAR_URI,
Expand Down
27 changes: 27 additions & 0 deletions pages/tool/_id.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { mount } from '@vue/test-utils';
import Tool from './_id.vue';

const factory = () => {
return mount(Tool, {
...createComponentMocks({}),
mocks: {
$route: { params: { id: 'TESTID' } },
$config: { OEB_LEGACY_ANGULAR_URI: 'https://jest-openebench.bsc.es/' },
},
});
};

describe('Tool', () => {
it('is instantiated', () => {
const wrapper = factory();
expect(wrapper).toBeTruthy();
});

it('sets the iframe url according to env variable', () => {
const wrapper = factory();
expect(wrapper.vm.hostName).toBe('https://jest-openebench.bsc.es/');
expect(wrapper.find('iframe').attributes('src')).toBe(
'https://jest-openebench.bsc.es/tool/TESTID'
);
});
});
22 changes: 22 additions & 0 deletions pages/tool/_id.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<iframe
:src="hostName + `tool/` + $route.params.id"
width="100%"
height="100%"
frameborder="0"
class="mt-5"
>
</iframe>
</template>

<script>
export default {
name: 'ToolsMonitoringIdPage',
layout: 'embedIframe',
data() {
return {
hostName: this.$config.OEB_LEGACY_ANGULAR_URI,
};
},
};
</script>
4 changes: 2 additions & 2 deletions pages/tools.spec.js → pages/tool/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from '@vue/test-utils';
import Tools from './tools.vue';
import Tools from './index.vue';

const factory = (query) => {
return mount(Tools, {
Expand All @@ -11,7 +11,7 @@ const emptyQueryMock = { query: { search: '' } };
const queryString = 'search_query';
const queryMock = { query: { search: queryString } };

describe('Tools', () => {
describe('Tools Index', () => {
it('is instantiated', () => {
const wrapper = factory(emptyQueryMock);
expect(wrapper).toBeTruthy();
Expand Down
File renamed without changes.

0 comments on commit 3727eca

Please sign in to comment.