Skip to content

fix: .github files

fix: .github files #10

Workflow file for this run

name: CI Workflow
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
build:
name: Build Project
runs-on: ubuntu-latest
needs: test

Check failure on line 32 in .github/workflows/workflow.yaml

View workflow run for this annotation

GitHub Actions / CI Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/workflow.yaml (Line: 32, Col: 12): Job 'build' depends on unknown job 'test'. .github/workflows/workflow.yaml (Line: 51, Col: 12): Job 'dockerize' depends on job 'build' which creates a cycle in the dependency graph.
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build Next.js project
run: npm run build
dockerize:
name: Build Docker Image
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
run: |
docker build -t sot .
- name: Run Docker container
run: |
docker run -d -p 3000:3000 sot
- name: Test Docker container
run: |
# Example test to check if the application is running
curl --silent --fail http://localhost:3000 || exit 1