Skip to content

test stage needs analyse to succeed #115

test stage needs analyse to succeed

test stage needs analyse to succeed #115

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# analyse code for security
analyze:
name: Analyze for ${{matrix.os}}
runs-on: ${{matrix.os}}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false # If `fail-fast: true`, GitHub will cancel in-progress and queued jobs in the matrix if any fails
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# test with npm the /tests/**.test.js files
test:
needs: analyse

Check failure on line 45 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 45, Col: 12): Job 'test' depends on unknown job 'analyse'. .github/workflows/main.yml (Line: 65, Col: 12): Job 'deploy' depends on job 'test' which creates a cycle in the dependency graph.
name: Test with node-${{matrix.node-versions}}
strategy:
matrix:
node-versions: ['16', 'latest']
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-versions }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
# build and deploy site to github-pages
deploy:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4