Fix: try to fix acces to backend #111
Workflow file for this run
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: "test-front" | |
on: | |
pull_request: | |
paths: | |
- 'frontend/**' | |
jobs: | |
linting-frontend: | |
name: Linting frontend | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Code Linting | |
run: npm run lint | |
test-client: | |
needs: linting-frontend | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Get the code | |
uses: actions/checkout@v4 | |
- name: Install nodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install deps | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
build-and-push-frontend: | |
needs: test-client | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: "{{defaultContext}}:frontend" | |
file: "Dockerfile.production" | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/wild-code-online-frontend:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |