Skip to content

Commit

Permalink
Merge pull request #22 from wakscord/add-pytest-workflow-in-ci
Browse files Browse the repository at this point in the history
CI에 pytest workflow 추가
  • Loading branch information
cdw8431 authored Aug 5, 2023
2 parents 648508d + 2e4fac4 commit 8cb7b6d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8cb7b6d

Please sign in to comment.