name: Test Workflow
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: echo "Building the project"
test:
name: Run Tests
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test
run: echo "Running tests"
deploy:
name: Deploy to Production
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy
run: echo "Deploying to production"