Skip to content

Commit 106557a

Browse files
chore: add license header and compatibilities checks in CI (#56)
Signed-off-by: Joris Mancini <[email protected]>
1 parent 7dc7924 commit 106557a

File tree

7 files changed

+77
-0
lines changed

7 files changed

+77
-0
lines changed

.github/config/.licenserc.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
header:
2+
license:
3+
spdx-id: MPL-2.0
4+
pattern: |
5+
Copyright copyright \d{4}, RTE \(http:\/\/www\.rte-france\.com\)
6+
This Source Code Form is subject to the terms of the Mozilla Public
7+
License, v\. 2\.0\. If a copy of the MPL was not distributed with this
8+
file, You can obtain one at http:\/\/mozilla\.org\/MPL\/2\.0\/\.
9+
10+
paths-ignore:
11+
- 'dist'
12+
- 'licenses'
13+
- '**/*.md'
14+
- 'LICENSE'
15+
- 'NOTICE'
16+
- 'Dockerfile'
17+
- '**/.*'
18+
- '**/*.txt'
19+
- '**/*.json'
20+
- '**/*.yaml'
21+
- '**/*.yml'
22+
- '**/*.svg'
23+
- '**/*.css'
24+
- '**/*.conf'
25+
- '**/*.properties'
26+
27+
comment: on-failure

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ on:
77
pull_request:
88

99
jobs:
10+
license-headers:
11+
name: Check licenses headers
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/setup-node@v3
16+
- name: Checkout sources
17+
uses: actions/checkout@v2
18+
with:
19+
persist-credentials: false
20+
21+
- name: Check License Header (Check Mode)
22+
uses: apache/skywalking-eyes/[email protected]
23+
with:
24+
config: .github/config/.licenserc.yaml
25+
1026
build-and-deploy:
1127
runs-on: ubuntu-latest
1228

@@ -24,6 +40,7 @@ jobs:
2440
- name: Install and Build
2541
run: |
2642
npm install
43+
npm run licenses-check
2744
npm run lint
2845
npm run test:coverage
2946
npm run build

src/components/App/app.test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
17
// app.test.tsx
28

39
import React, { FunctionComponent, PropsWithChildren } from 'react';

src/module-emotion.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
17
// https://github.com/emotion-js/emotion/discussions/2291
28
// https://emotion.sh/docs/typescript#define-a-theme
39

src/module-mui.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
17
// https://mui.com/material-ui/customization/theming/#typescript
28
import { CSSObject } from '@mui/styled-engine';
39
import { Theme as MuiTheme, ThemeOptions as MuiThemeOptions } from '@mui/material/styles/createTheme';
@@ -15,7 +21,9 @@ declare module '@mui/material/styles/createTheme' {
1521
agGridTheme: 'ag-theme-alpine' | 'ag-theme-alpine-dark';
1622
agGridThemeOverride?: CSSObject;
1723
};
24+
1825
export interface Theme extends MuiTheme, ThemeExtension {}
26+
1927
// allow configuration using `createTheme`
2028
export interface ThemeOptions extends MuiThemeOptions, Partial<ThemeExtension> {}
2129
}

src/services/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
7+
18
export * as ConfigSrv from './config';
29
export type * from './config';
310

src/translations/ag-grid/locales.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
17
// from https://github.com/ag-grid/ag-grid/blob/latest/documentation/ag-grid-docs/src/content/docs/localisation/_examples/localisation/locale.en.js
28
/* eslint-disable no-template-curly-in-string */
39

0 commit comments

Comments
 (0)