Skip to content

Commit 4bf2276

Browse files
authored
Merge pull request #1153 from fabiovincenzi/feature/automated-code-formatting
feat: implement formatting checks to CI
2 parents 94d807d + 2c26dfd commit 4bf2276

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1664
-1991
lines changed

.eslintrc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@
1717
],
1818
"overrides": [
1919
{
20-
"files": ["test/**/*.js", "**/*.json"],
20+
"files": ["test/**/*.js", "**/*.json", "cypress/**/*.js", "plugins/**/*.js"],
21+
"parserOptions": {
22+
"project": null
23+
},
2124
"parser": "espree",
25+
"env": {
26+
"cypress/globals": true
27+
},
28+
"plugins": ["cypress"],
2229
"rules": {
2330
"@typescript-eslint/no-unused-expressions": "off"
2431
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/ISSUE_TEMPLATE/meeting_minutes.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,38 @@ name: "\U0001F91D GitProxy Meeting Minutes"
33
about: To track GitProxy meeting agenda and attendance
44
title: DD MMM YYYY - GitProxy Meeting Minutes
55
labels: meeting
6-
assignees:
7-
6+
assignees:
87
---
98

10-
## Date
9+
## Date
10+
1111
YYYYMMDD - time
1212

1313
## Meeting info
14+
1415
- [Meeting link](https://zoom-lfx.platform.linuxfoundation.org/meeting/95849833904?password=99413314-d03a-4b1c-b682-1ede2c399595)
1516

1617
- [Register for future meetings](https://zoom-lfx.platform.linuxfoundation.org/meeting/95849833904?password=99413314-d03a-4b1c-b682-1ede2c399595&invite=true)
1718

1819
## Untracked attendees
20+
1921
- Full Name, Affiliation, (optional) GitHub username
2022
- ...
2123

2224
## Meeting notices
25+
2326
- FINOS **Project leads** are responsible for observing the FINOS guidelines for [running project meetings](https://community.finos.org/docs/governance/meeting-procedures/). Project maintainers can find additional resources in the [FINOS Maintainers Cheatsheet](https://community.finos.org/docs/finos-maintainers-cheatsheet).
2427

25-
- **All participants** in FINOS project meetings are subject to the [LF Antitrust Policy](https://www.linuxfoundation.org/antitrust-policy/), the [FINOS Community Code of Conduct](https://community.finos.org/docs/governance/code-of-conduct) and all other [FINOS policies](https://community.finos.org/docs/governance/#policies).
28+
- **All participants** in FINOS project meetings are subject to the [LF Antitrust Policy](https://www.linuxfoundation.org/antitrust-policy/), the [FINOS Community Code of Conduct](https://community.finos.org/docs/governance/code-of-conduct) and all other [FINOS policies](https://community.finos.org/docs/governance/#policies).
2629

2730
- FINOS meetings involve participation by industry competitors, and it is the intention of FINOS and the Linux Foundation to conduct all of its activities in accordance with applicable antitrust and competition laws. It is therefore extremely important that attendees adhere to meeting agendas, and be aware of, and not participate in, any activities that are prohibited under applicable US state, federal or foreign antitrust and competition laws. Please contact [email protected] with any questions.
2831

2932
- FINOS project meetings may be recorded for use solely by the FINOS team for administration purposes. In very limited instances, and with explicit approval, recordings may be made more widely available.
3033

3134
## Agenda
35+
3236
- [ ] Convene & roll call (5mins)
33-
- [ ] Display [FINOS Antitrust Policy summary slide](https://community.finos.org/Compliance-Slides/Antitrust-Compliance-Slide.pdf)
37+
- [ ] Display [FINOS Antitrust Policy summary slide](https://community.finos.org/Compliance-Slides/Antitrust-Compliance-Slide.pdf)
3438
- [ ] Review Meeting Notices (see above)
3539
- [ ] Approve past meeting minutes
3640
- [ ] Agenda item 1
@@ -39,11 +43,13 @@ YYYYMMDD - time
3943
- [ ] AOB, Q&A & Adjourn (5mins)
4044

4145
## Decisions Made
46+
4247
- [ ] Decision 1
4348
- [ ] Decision 2
4449
- [ ] ...
4550

4651
## Action Items
52+
4753
- [ ] Action 1
4854
- [ ] Action 2
4955
- [ ] ...

.github/workflows/ci.yml

Lines changed: 68 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ name: CI
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [main]
99
pull_request:
10-
branches: [ main ]
10+
branches: [main]
1111

1212
permissions:
1313
pull-requests: write
1414

1515
jobs:
1616
build:
17-
1817
runs-on: ubuntu-latest
1918

2019
strategy:
@@ -23,71 +22,69 @@ jobs:
2322
mongodb-version: [4.4]
2423

2524
steps:
26-
- name: Harden Runner
27-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
28-
with:
29-
egress-policy: audit
30-
31-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
32-
with:
33-
fetch-depth: 0
34-
35-
- name: Use Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
37-
with:
38-
node-version: ${{ matrix.node-version }}
39-
40-
- name: Start MongoDB
41-
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
42-
with:
43-
mongodb-version: ${{ matrix.mongodb-version }}
44-
45-
- name: Install dependencies
46-
run: npm i
47-
48-
# for now only check the types of the server
49-
# tsconfig isn't quite set up right to respect what vite accepts
50-
# for the frontend code
51-
- name: Check Types (Server)
52-
run: npm run check-types:server
53-
54-
- name: Test
55-
id: test
56-
run: |
57-
npm run test-coverage-ci
58-
npm run test-coverage-ci --workspaces --if-present
59-
60-
- name: Upload test coverage report
61-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
62-
with:
63-
files: ./coverage/lcov.info
64-
token: ${{ secrets.CODECOV_TOKEN }}
65-
# - name: Exit if coverage condition not met
66-
# if: ${{ steps.test.outputs.exit_code }} != 0
67-
# run: exit ${{ steps.test.outputs.exit_code }}
68-
69-
- name: Build frontend
70-
run: npm run build-ui
71-
72-
- name: Save build folder
73-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
74-
with:
75-
name: build
76-
if-no-files-found: error
77-
path: build
78-
79-
- name: Download the build folders
80-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
81-
with:
82-
name: build
83-
path: build
84-
85-
- name: Run cypress test
86-
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
87-
with:
88-
start: npm start &
89-
wait-on: "http://localhost:3000"
90-
wait-on-timeout: 120
91-
run: npm run cypress:run
92-
93-
25+
- name: Harden Runner
26+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
27+
with:
28+
egress-policy: audit
29+
30+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Use Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
39+
- name: Start MongoDB
40+
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
41+
with:
42+
mongodb-version: ${{ matrix.mongodb-version }}
43+
44+
- name: Install dependencies
45+
run: npm i
46+
47+
# for now only check the types of the server
48+
# tsconfig isn't quite set up right to respect what vite accepts
49+
# for the frontend code
50+
- name: Check Types (Server)
51+
run: npm run check-types:server
52+
53+
- name: Test
54+
id: test
55+
run: |
56+
npm run test-coverage-ci
57+
npm run test-coverage-ci --workspaces --if-present
58+
59+
- name: Upload test coverage report
60+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
61+
with:
62+
files: ./coverage/lcov.info
63+
token: ${{ secrets.CODECOV_TOKEN }}
64+
# - name: Exit if coverage condition not met
65+
# if: ${{ steps.test.outputs.exit_code }} != 0
66+
# run: exit ${{ steps.test.outputs.exit_code }}
67+
68+
- name: Build frontend
69+
run: npm run build-ui
70+
71+
- name: Save build folder
72+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
73+
with:
74+
name: build
75+
if-no-files-found: error
76+
path: build
77+
78+
- name: Download the build folders
79+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
80+
with:
81+
name: build
82+
path: build
83+
84+
- name: Run cypress test
85+
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
86+
with:
87+
start: npm start &
88+
wait-on: 'http://localhost:3000'
89+
wait-on-timeout: 120
90+
run: npm run cypress:run

.github/workflows/codeql.yml

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: ['main']
1717
pull_request:
18-
branches: [ "main" ]
18+
branches: ['main']
1919
schedule:
2020
- cron: '25 10 * * 1'
2121

@@ -43,50 +43,49 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
language: [ 'javascript-typescript' ]
46+
language: ['javascript-typescript']
4747
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
4848
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
4949
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
5050
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
5151

5252
steps:
53-
- name: Harden Runner
54-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2
55-
with:
56-
egress-policy: audit
53+
- name: Harden Runner
54+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2
55+
with:
56+
egress-policy: audit
5757

58-
- name: Checkout repository
59-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
58+
- name: Checkout repository
59+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
6060

61-
# Initializes the CodeQL tools for scanning.
62-
- name: Initialize CodeQL
63-
uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 # v3
64-
with:
65-
languages: ${{ matrix.language }}
66-
# If you wish to specify custom queries, you can do so here or in a config file.
67-
# By default, queries listed here will override any specified in a config file.
68-
# Prefix the list here with "+" to use these queries and those in the config file.
61+
# Initializes the CodeQL tools for scanning.
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 # v3
64+
with:
65+
languages: ${{ matrix.language }}
66+
# If you wish to specify custom queries, you can do so here or in a config file.
67+
# By default, queries listed here will override any specified in a config file.
68+
# Prefix the list here with "+" to use these queries and those in the config file.
6969

70-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
71-
# queries: security-extended,security-and-quality
70+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
71+
# queries: security-extended,security-and-quality
7272

73+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
74+
# If this step fails, then you should remove it and run the build manually (see below)
75+
- name: Autobuild
76+
uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 # v3
7377

74-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
75-
# If this step fails, then you should remove it and run the build manually (see below)
76-
- name: Autobuild
77-
uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 # v3
78+
# ℹ️ Command-line programs to run using the OS shell.
79+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
7880

79-
# ℹ️ Command-line programs to run using the OS shell.
80-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
81+
# If the Autobuild fails above, remove it and uncomment the following three lines.
82+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
8183

82-
# If the Autobuild fails above, remove it and uncomment the following three lines.
83-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
84+
# - run: |
85+
# echo "Run, Build Application using script"
86+
# ./location_of_script_within_repo/buildscript.sh
8487

85-
# - run: |
86-
# echo "Run, Build Application using script"
87-
# ./location_of_script_within_repo/buildscript.sh
88-
89-
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 # v3
91-
with:
92-
category: "/language:${{matrix.language}}"
88+
- name: Perform CodeQL Analysis
89+
uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 # v3
90+
with:
91+
category: '/language:${{matrix.language}}'

.github/workflows/lint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ jobs:
3030

3131
- name: Install Dependencies
3232
run: npm install --workspaces
33-
33+
3434
- name: Code Linting
3535
run: |
3636
npm run lint
37-
npm run lint --workspaces --if-present
37+
npm run lint --workspaces --if-present
38+
39+
- name: Check formatting
40+
run: npm run format:check

0 commit comments

Comments
 (0)