Skip to content

Commit

Permalink
adding github actions workflow that triggers a build in python 3.9, 3…
Browse files Browse the repository at this point in the history
….10, 3.11 and 3.12 on commit to main
  • Loading branch information
ooemperor committed Nov 16, 2023
1 parent 16786f0 commit 94a2634
Showing 1 changed file with 119 additions and 0 deletions.
119 changes: 119 additions & 0 deletions .github/workflows/codeGrader-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: CodeGrader build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read


jobs:

build-backend:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

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 flake8 pytest
pip install -r codeGrader/backend/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build package
run: python setup_backend.py build

build-frontend:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

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 flake8 pytest
pip install -r codeGrader/frontend/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build package
run: python setup_frontend.py build

build-full:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

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 flake8 pytest
pip install -r codeGrader/backend/requirements.txt
pip install -r codeGrader/frontend/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build package
run: python setup_full.py build

0 comments on commit 94a2634

Please sign in to comment.