diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml new file mode 100644 index 000000000..5ada907b7 --- /dev/null +++ b/.github/workflows/run_test.yml @@ -0,0 +1,32 @@ +name: simple_calculator unit test + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with Ruff + run: | + pip install ruff + ruff --format=github --target-version=py310 . + continue-on-error: true + - name: Test with pytest + run: | + coverage run -m pytest tests/tests_1b.py -v -s + - name: Generate Coverage Report + run: | + coverage report -m diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index 9d15ec837..d045e23d2 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -8,9 +8,9 @@ def main(): print("Hello World!") - name = "" # TODO: Insert your name between the double quotes - + name = "Jinglian" # TODO: Insert your name between the double quotes + robot_speed = 8 + print(f"{name}, Welcome to the CSS course!") print(f"{name}, Welcome to the CSS course!") - if __name__ == "__main__": main()