Skip to content

Commit 8e4b339

Browse files
author
Francis Lavoie
authored
Merge pull request #434 from include-dcc/feat/sjip-644
feat: SJIP-644 github actions
2 parents 97ffdff + db70c96 commit 8e4b339

File tree

7 files changed

+215
-16575
lines changed

7 files changed

+215
-16575
lines changed

.github/workflows/commit_lint.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Commit Lint Check
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Commit Lint Check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
submodules: true
14+
- name: Lint Commits
15+
uses: Ferlab-Ste-Justine/action-commit-lint@v2

.github/workflows/coverage.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Quality'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
actions: write
10+
checks: write
11+
contents: write
12+
deployments: write
13+
issues: write
14+
packages: write
15+
pull-requests: write
16+
repository-projects: write
17+
security-events: write
18+
statuses: write
19+
20+
jobs:
21+
coverage:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
submodules: true
28+
- uses: ArtiomTr/jest-coverage-report-action@v2
29+
id: coverage
30+
with:
31+
test-script: npm run coverage:changed
32+
output: report-markdown
33+
- uses: marocchino/sticky-pull-request-comment@v2
34+
with:
35+
header: PR Coverage
36+
message: ${{ steps.coverage.outputs.report }}

.github/workflows/tests.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Quality'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
actions: write
10+
checks: write
11+
contents: write
12+
deployments: write
13+
issues: write
14+
packages: write
15+
pull-requests: write
16+
repository-projects: write
17+
security-events: write
18+
statuses: write
19+
20+
jobs:
21+
tests:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
with:
26+
submodules: true
27+
- name: Install modules
28+
run: npm i
29+
- name: Run tests
30+
id: tests
31+
run: |
32+
echo " " >> results.log
33+
echo "## Project Coverage and Test" >> results.log
34+
echo "" >> results.log
35+
echo "`npm run test:github 2>&1 | sed 's/=//g' | tail -n 11`" >> results.log
36+
echo " " >> results.log
37+
- uses: marocchino/sticky-pull-request-comment@v2
38+
with:
39+
header: Project Coverage and Test
40+
path: results.log

jest.config.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
testEnvironment: 'jest-environment-jsdom',
3+
moduleNameMapper: {
4+
'^react-native$': 'react-native-web',
5+
'^.+\\.module\\.(css|sass|scss)$': '<rootDir>/.jest/identity-obj-proxy-esm.js',
6+
},
7+
collectCoverageFrom: ['./src/**/*.{js,jsx,ts,tsx}'],
8+
coverageReporters: ['json', 'lcov', 'text-summary', 'json-summary'],
9+
coverageThreshold: {
10+
global: {
11+
branches: 0,
12+
functions: 5,
13+
lines: 15,
14+
statements: 15,
15+
},
16+
},
17+
};

0 commit comments

Comments
 (0)