Skip to content

Commit

Permalink
Merge pull request #36 from CS222-UIUC/zfeng13-4
Browse files Browse the repository at this point in the history
Zfeng13 4
  • Loading branch information
xxxfzxxx authored Nov 4, 2022
2 parents 93b75ce + ea8787b commit b80023e
Show file tree
Hide file tree
Showing 45 changed files with 3,201 additions and 2,291 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/black.yml
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
40 changes: 20 additions & 20 deletions .github/workflows/eslint.yml
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/
38 changes: 19 additions & 19 deletions .github/workflows/jest-coverage.yml
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
36 changes: 18 additions & 18 deletions .github/workflows/prettier.yml
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
53 changes: 27 additions & 26 deletions .github/workflows/pylint.yml
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
90 changes: 45 additions & 45 deletions .github/workflows/pytest-coverage.yml
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
Loading

3 comments on commit b80023e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py820100%
dataholders
   apt.py90100%
   review.py70100%
pages
   login.py310100%
   mainpage.py860100%
TOTAL2150100%

Tests Skipped Failures Errors Time
44 0 💤 0 ❌ 0 🔥 0.585s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py820100%
dataholders
   apt.py90100%
   review.py70100%
pages
   login.py310100%
   mainpage.py860100%
TOTAL2150100%

Tests Skipped Failures Errors Time
44 0 💤 0 ❌ 0 🔥 0.782s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py820100%
dataholders
   apt.py90100%
   review.py70100%
pages
   login.py310100%
   mainpage.py860100%
TOTAL2150100%

Tests Skipped Failures Errors Time
44 0 💤 0 ❌ 0 🔥 0.717s ⏱️

Please sign in to comment.