diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f442a20 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Test +on: + push: + branches: + - 'main' + pull_request: + types: + - opened + - synchronize + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/cache@v3 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-pip-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: pip install -r requirements.txt + + - name: Create Empty Dotenv + run: cp -r .env.sample .env + + - name: Test with pytest + run: pytest