From 8f3655be0381a31d06a348873b1b4a9a23b81207 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Sun, 8 Oct 2023 10:48:22 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20auto=20code=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/code-check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/code-check.yml diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml new file mode 100644 index 0000000..e9c99b9 --- /dev/null +++ b/.github/workflows/code-check.yml @@ -0,0 +1,25 @@ +name: ☑️ Code Check + +on: [push] + +jobs: + pre-commit: + strategy: + matrix: + python-version: [3.10, 3.11] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install pre-commit + run: pip install pre-commit poetry pytest typing-extensions + - name: Run pre-commit + run: pre-commit run --all-files + - name: Install dependencies + run: poetry config virtualenvs.create false && poetry install --extras "all" + - name: Run tests + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + run: pytest