From 2e4fac4d3723db27d158c62feb0cd5a51d52c336 Mon Sep 17 00:00:00 2001 From: cdw8431 Date: Sat, 5 Aug 2023 20:52:15 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20pytest=20actions=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test.yml 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