From e70881befc59fa28d4301d830bbe726388f6d5c9 Mon Sep 17 00:00:00 2001 From: Trevor Blanarik Date: Fri, 20 Sep 2024 22:14:56 -0700 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ac43f51 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Test SpotBot + +on: + push: + branches: + - main + workflow_dispatch: + +env: + PYTHON_VERSION: '3.11' # set this to the python version to use (supports 3.6, 3.7, 3.8) + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python version + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run Python unit tests + run: python -u -m unittest test.py