Fixed missing redis build for Github actions. #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis:7.4.0 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and test backend Docker image | |
run: | | |
docker build --target backend -t backend -f Dockerfile . | |
docker build --target tests -t tests -f Dockerfile . | |
docker run --rm tests | |
- name: Build frontend Docker image | |
run: docker build --target frontend -t frontend -f Dockerfile . | |
- name: Run frontend build in Docker | |
run: docker run --rm frontend npm run build |