Skip to content

CI

CI #13

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 7 * * 1'
workflow_run:
workflows: ['Deploy preview']
branches-ignore:
- master
jobs:
# This job is used to determine what files have changed and is used by later jobs to determine if they should run.
setup:
name: Setup
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
frontend: ${{ steps.check-changed-files.outputs.frontend_any_changed }}
config: ${{ steps.check-changed-files.outputs.config_any_changed }}
markdown: ${{ steps.check-changed-files.outputs.markdown_any_changed }}
json: ${{ steps.check-changed-files.outputs.json_any_changed }}
python: ${{ steps.check-changed-files.outputs.python_any_changed }}
workflows: ${{ steps.check-changed-files.outputs.workflows_any_changed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check which files have changed
id: check-changed-files
uses: tj-actions/[email protected]
with:
files_yaml_from_source_file: .github/filter-groups.yml
- name: Log outputs
run: |
echo "frontend changed: ${{ steps.check-changed-files.outputs.frontend_any_changed }}
echo "config changed: ${{ steps.check-changed-files.outputs.config_any_changed }}
echo "markdown changed: ${{ steps.check-changed-files.outputs.markdown_any_changed }}
echo "json changed: ${{ steps.check-changed-files.outputs.json_any_changed }}
echo "python changed: ${{ steps.check-changed-files.outputs.python_any_changed }}
echo "workflows changed: ${{ steps.check-changed-files.outputs.workflows_any_changed }}
# Repository wide checks
prettier:
name: Prettier
uses: ./.github/workflows/prettier.yml
earthly:
name: earthly
needs: [prettier]
uses: ./.github/workflows/earthly-contrib.yml
secrets: inherit
validate_local_links:
name: Validate
needs: [setup]
if: >-
needs.setup.outputs.markdown != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/validate_local_links_in_md.yml
jsonlint:
name: JSONLint
needs: [setup, prettier]
if: >-
needs.setup.outputs.json != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/jsonlint.yml
# Frontend checks
unit_test:
name: Unit test
needs: [setup]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/unit_test.yml
eslint:

Check failure on line 82 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/CI.yml (Line: 82, Col: 3): Error calling workflow 'silimotion/electricitymaps-contrib/.github/workflows/eslint.yml@417ea929239f2d904f5c6694af527a0b966bc16b'. The nested job 'eslint' is requesting 'security-events: write', but is only allowed 'security-events: none'.
name: ESLint
needs: [setup, prettier]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/eslint.yml
typecheck:
name: Typecheck
needs: [setup, prettier]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/typecheck.yml
deploy_preview_branch:
name: Deploy preview
needs: [eslint, typecheck, setup, validate_generate_files, unit_test]
if: >-
(needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false') &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.ref_name != 'master'
uses: ./.github/workflows/deploy_preview_branch.yml
secrets: inherit
cypress:
name: Cypress
needs: [eslint, typecheck, validate_generate_files, unit_test]
uses: ./.github/workflows/cypress.yml
# Python checks
python_formatting:
name: Python
needs: [setup]
if: >-
needs.setup.outputs.python != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/python_formatting.yml
python_tests:
name: Python
needs: [setup]
if: >-
needs.setup.outputs.python != 'false' ||
needs.setup.outputs.config != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/python_tests.yml
# Config checks
validate_config_filenames:
name: Validate
needs: [setup]
if: >-
needs.setup.outputs.config != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/validate_filenames.yml
validate_generate_files:
name: Validate
needs: [setup]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.config != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/validate_generate_files.yml
# Code quality checks
codeql:
needs: [setup, prettier]
name: CodeQL
uses: ./.github/workflows/codeql.yml