-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from CS222-UIUC/zfeng13-4
Zfeng13 4
- Loading branch information
Showing
45 changed files
with
3,201 additions
and
2,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: Black Styling | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linter_name: | ||
name: runner / black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check files using the black formatter | ||
uses: rickstaa/action-black@v1 | ||
id: action_black | ||
with: | ||
black_args: "--check ." | ||
- name: Annotate diff changes using reviewdog | ||
if: steps.action_black.outputs.is_formatted == 'true' | ||
uses: reviewdog/action-suggester@v1 | ||
with: | ||
name: Black Styling | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linter_name: | ||
name: runner / black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check files using the black formatter | ||
uses: rickstaa/action-black@v1 | ||
id: action_black | ||
with: | ||
black_args: "--check ." | ||
- name: Annotate diff changes using reviewdog | ||
if: steps.action_black.outputs.is_formatted == 'true' | ||
uses: reviewdog/action-suggester@v1 | ||
with: | ||
tool_name: blackfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
name: ESLint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# Make sure the actual branch is checked out when running on pull requests | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install dependencies | ||
run: npm install --no-package-lock eslint eslint-plugin-react --legacy-peer-deps | ||
working-directory: src/frontend/ | ||
|
||
- name: Run ESLint | ||
run: npx eslint --max-warnings 0 $(git ls-files '*.js' '*.jsx' '*.ts' '*.tsx') | ||
name: ESLint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# Make sure the actual branch is checked out when running on pull requests | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install dependencies | ||
run: npm install --no-package-lock eslint eslint-plugin-react --legacy-peer-deps | ||
working-directory: src/frontend/ | ||
|
||
- name: Run ESLint | ||
run: npx eslint --max-warnings 0 $(git ls-files '*.js' '*.jsx' '*.ts' '*.tsx') | ||
working-directory: src/frontend/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: Jest Coverage Calculation | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: npm ci --legacy-peer-deps | ||
working-directory: src/frontend | ||
|
||
- name: Run tests | ||
run: | | ||
npx ts-jest config:init --coverage --coverageReporters json-summary | ||
working-directory: src/frontend | ||
|
||
- name: Jest coverage comment | ||
name: Jest Coverage Calculation | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: npm ci --legacy-peer-deps | ||
working-directory: src/frontend | ||
|
||
- name: Run tests | ||
run: | | ||
npx ts-jest config:init --coverage --coverageReporters json-summary | ||
working-directory: src/frontend | ||
|
||
- name: Jest coverage comment | ||
uses: MishaKav/jest-coverage-comment@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Prettier Styling | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# Make sure the actual branch is checked out when running on pull requests | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Prettify code | ||
run: | | ||
npx prettier --check src/. | ||
name: Prettier Styling | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# Make sure the actual branch is checked out when running on pull requests | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Prettify code | ||
run: | | ||
npx prettier --check src/. | ||
working-directory: src/frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
name: Pylint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flask | ||
pip install pylint | ||
pip install pytest==7.1.3 | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | ||
working-directory: src/backend | ||
name: Pylint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flask | ||
pip install pylint | ||
pip install pytest==7.1.3 | ||
pip install flask-cors | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | ||
working-directory: src/backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
name: Pytest Coverage Calculation | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: wget https://sqlite.org/2022/sqlite-autoconf-3380500.tar.gz | ||
- run: tar -xvf sqlite-autoconf-3380500.tar.gz | ||
- run: ./configure | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: make | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: sudo make install | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: export PATH="/usr/local/lib:$PATH" | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
working-directory: src/backend | ||
|
||
- name: Build coverage file | ||
run: | | ||
pytest --junitxml=pytest.xml --cov-report=term-missing --cov=. | tee pytest-coverage.txt | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib | ||
working-directory: src/backend | ||
|
||
- name: Pytest coverage comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
pytest-coverage-path: src/backend/pytest-coverage.txt | ||
junitxml-path: src/backend/pytest.xml | ||
name: Pytest Coverage Calculation | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: wget https://sqlite.org/2022/sqlite-autoconf-3380500.tar.gz | ||
- run: tar -xvf sqlite-autoconf-3380500.tar.gz | ||
- run: ./configure | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: make | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: sudo make install | ||
working-directory: sqlite-autoconf-3380500 | ||
- run: export PATH="/usr/local/lib:$PATH" | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
working-directory: src/backend | ||
|
||
- name: Build coverage file | ||
run: | | ||
pytest --junitxml=pytest.xml --cov-report=term-missing --cov=. | tee pytest-coverage.txt | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib | ||
working-directory: src/backend | ||
|
||
- name: Pytest coverage comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
pytest-coverage-path: src/backend/pytest-coverage.txt | ||
junitxml-path: src/backend/pytest.xml |
Oops, something went wrong.
b80023e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
b80023e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
b80023e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report