Skip to content

Commit 14fe2d9

Browse files
author
Adam Stankiewicz
authored
fix: use LOGO_URL and move to GH actions (openedx#81)
* fix: use LOGO_URL and move to GH actions * fix: duplicate i18n message id
1 parent 78573e3 commit 14fe2d9

File tree

7 files changed

+74
-28
lines changed

7 files changed

+74
-28
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Default CI
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v2
9+
with:
10+
fetch-depth: 0
11+
- name: Setup Nodejs
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- name: Install dependencies
16+
run: npm ci
17+
- name: Validate package-lock.json changes
18+
run: make validate-no-uncommitted-package-lock-changes
19+
- name: Lint
20+
run: npm run lint
21+
- name: Test
22+
run: npm run test
23+
- name: i18n_extract
24+
run: npm run i18n_extract
25+
- name: Coverage
26+
uses: codecov/codecov-action@v1

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Validate package-lock.json changes
22+
run: make validate-no-uncommitted-package-lock-changes
23+
- name: Lint
24+
run: npm run lint
25+
- name: Test
26+
run: npm run test
27+
- name: i18n_extract
28+
run: npm run i18n_extract
29+
- name: Coverage
30+
uses: codecov/codecov-action@v1
31+
- name: Build
32+
run: npm run build
33+
- name: Release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
37+
run: npx semantic-release

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Header.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ensureConfig([
2020
'LOGOUT_URL',
2121
'LOGIN_URL',
2222
'SITE_NAME',
23-
'LOGO_TRADEMARK_URL',
23+
'LOGO_URL',
2424
], 'Header component');
2525

2626
subscribe(APP_CONFIG_INITIALIZED, () => {
@@ -77,7 +77,7 @@ function Header({ intl }) {
7777
];
7878

7979
const props = {
80-
logo: config.LOGO_TRADEMARK_URL,
80+
logo: config.LOGO_URL,
8181
logoAltText: config.SITE_NAME,
8282
siteName: config.SITE_NAME,
8383
logoDestination: `${config.LMS_BASE_URL}/dashboard`,

src/Header.messages.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const messages = defineMessages({
6767
description: 'The aria label for the account menu trigger',
6868
},
6969
'header.label.account.menu.for': {
70-
id: 'header.label.account.menu',
70+
id: 'header.label.account.menu.for',
7171
defaultMessage: 'Account menu for {username}',
7272
description: 'The aria label for the account menu trigger when the username is displayed in it',
7373
},

src/Header.test.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('<Header />', () => {
1919
SITE_NAME: process.env.SITE_NAME,
2020
LOGIN_URL: process.env.LOGIN_URL,
2121
LOGOUT_URL: process.env.LOGOUT_URL,
22-
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
22+
LOGO_URL: process.env.LOGO_URL,
2323
},
2424
}}
2525
>
@@ -51,7 +51,7 @@ describe('<Header />', () => {
5151
SITE_NAME: process.env.SITE_NAME,
5252
LOGIN_URL: process.env.LOGIN_URL,
5353
LOGOUT_URL: process.env.LOGOUT_URL,
54-
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
54+
LOGO_URL: process.env.LOGO_URL,
5555
},
5656
}}
5757
>
@@ -78,7 +78,7 @@ describe('<Header />', () => {
7878
SITE_NAME: process.env.SITE_NAME,
7979
LOGIN_URL: process.env.LOGIN_URL,
8080
LOGOUT_URL: process.env.LOGOUT_URL,
81-
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
81+
LOGO_URL: process.env.LOGO_URL,
8282
},
8383
}}
8484
>
@@ -110,7 +110,7 @@ describe('<Header />', () => {
110110
SITE_NAME: process.env.SITE_NAME,
111111
LOGIN_URL: process.env.LOGIN_URL,
112112
LOGOUT_URL: process.env.LOGOUT_URL,
113-
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
113+
LOGO_URL: process.env.LOGO_URL,
114114
},
115115
}}
116116
>

src/__snapshots__/Header.test.jsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`<Header /> renders correctly for anonymous desktop 1`] = `
1717
<img
1818
alt="edX"
1919
className="d-block"
20-
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
20+
src="https://edx-cdn.org/v3/default/logo.svg"
2121
/>
2222
</a>
2323
<nav
@@ -126,7 +126,7 @@ exports[`<Header /> renders correctly for anonymous mobile 1`] = `
126126
<img
127127
alt="edX"
128128
className="d-block"
129-
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
129+
src="https://edx-cdn.org/v3/default/logo.svg"
130130
/>
131131
</a>
132132
</div>
@@ -201,7 +201,7 @@ exports[`<Header /> renders correctly for authenticated desktop 1`] = `
201201
<img
202202
alt="edX"
203203
className="d-block"
204-
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
204+
src="https://edx-cdn.org/v3/default/logo.svg"
205205
/>
206206
</a>
207207
<nav
@@ -360,7 +360,7 @@ exports[`<Header /> renders correctly for authenticated mobile 1`] = `
360360
<img
361361
alt="edX"
362362
className="d-block"
363-
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
363+
src="https://edx-cdn.org/v3/default/logo.svg"
364364
/>
365365
</a>
366366
</div>

0 commit comments

Comments
 (0)