Skip to content

Commit f0a41ac

Browse files
First pre-commit workflow
1 parent 58a78a8 commit f0a41ac

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/pre-commit.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: pre-commit
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
pre-commit:
9+
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
14+
ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }}
15+
RESET_PASSWORD_SECRET_KEY: ${{ secrets.RESET_PASSWORD_SECRET_KEY }}
16+
VERIFICATION_SECRET_KEY: ${{ secrets.VERIFICATION_SECRET_KEY }}
17+
OPENAPI_OUTPUT_FILE: ${{ secrets.OPENAPI_OUTPUT_FILE }}
18+
19+
steps:
20+
- name: Checkout code
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: Install Poetry with pip
29+
run: pip install poetry
30+
31+
- name: Configure Poetry
32+
working-directory: ./fastapi_backend
33+
run: poetry config virtualenvs.create false
34+
35+
- name: Install dependencies
36+
working-directory: ./fastapi_backend
37+
run: poetry install
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: "20"
43+
44+
- name: Install Node dependencies
45+
working-directory: ./nextjs-frontend
46+
run: npm install
47+
48+
- name: Run pre-commit
49+
uses: pre-commit/[email protected]

0 commit comments

Comments
 (0)