Skip to content

Update react-ci-last.yml #3

Update react-ci-last.yml

Update react-ci-last.yml #3

Workflow file for this run

name: CI-CD
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Set up Node.js environment
- name: setup node
uses: actions/setup-node@v2
with:
node-version: '14' # Change to your desired Node.js version
# Start Docker Compose
- name: Start Docker Compose
run: docker-compose up --build -d
# Install application dependencies
- name: Install dependencies
run: docker exec docker-react-c npm install --force
# Build the application
- name: Build
run: docker exec docker-react-c npm run build
# Run tests
- name: Run tests
run: docker exec docker-react-c npm test
# Stop Docker Compose after tests
- name: Stop Docker Compose
run: docker-compose down