feat: add backend and frontend testing steps to build workflow
Some checks failed
Chore App Build and Push Docker Images / build-and-push (push) Failing after 2m45s
Some checks failed
Chore App Build and Push Docker Images / build-and-push (push) Failing after 2m45s
This commit is contained in:
@@ -24,6 +24,35 @@ jobs:
|
|||||||
echo "tag=next-$version-$current_date" >> $GITHUB_OUTPUT
|
echo "tag=next-$version-$current_date" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Set up Python for backend tests
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: Install backend dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r backend/requirements.txt
|
||||||
|
|
||||||
|
- name: Run backend unit tests
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
pytest -q
|
||||||
|
|
||||||
|
- name: Set up Node.js for frontend tests
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "18"
|
||||||
|
cache: "npm"
|
||||||
|
|
||||||
|
- name: Install frontend dependencies
|
||||||
|
run: npm ci
|
||||||
|
working-directory: frontend/vue-app
|
||||||
|
|
||||||
|
- name: Run frontend unit tests
|
||||||
|
run: npm run test:unit --if-present
|
||||||
|
working-directory: frontend/vue-app
|
||||||
|
|
||||||
- name: Build Backend Docker Image
|
- name: Build Backend Docker Image
|
||||||
run: |
|
run: |
|
||||||
docker build -t git.ryankegel.com:3000/ryan/backend:${{ steps.vars.outputs.tag }} ./backend
|
docker build -t git.ryankegel.com:3000/ryan/backend:${{ steps.vars.outputs.tag }} ./backend
|
||||||
|
|||||||
Reference in New Issue
Block a user