Skip to content

Update EasyScience Organisation and Core logos #4

Update EasyScience Organisation and Core logos

Update EasyScience Organisation and Core logos #4

Workflow file for this run

# This is the workflow for testing the code quality:
# Check formatting of Markdown, YAML, TOML, etc. files
name: Check formatting
on:
# Trigger the workflow on push
push:
# Every branch
branches:
- '**'
# But do not run this workflow on creating a new tag starting with 'v', e.g. 'v1.0.3' (see pypi-publish.yml)
tags-ignore:
- 'v*'
# Trigger the workflow on pull request
pull_request:
branches:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent workflow, skipping runs queued between the run in-progress and latest queued.
# And cancel in-progress runs.
concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Job: Check code quality and consistency
code-quality:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install npm dependencies
# Install 'prettier' for code formatting of Markdown, YAML, etc. files
# Install 'prettier-plugin-toml' plugin for code formatting of TOML files
run: npm install prettier prettier-plugin-toml --save-dev --save-exact
# Check formatting of Markdown, YAML, TOML, etc. files with Prettier in the project root
- name: Check formatting of Markdown, YAML, TOML, etc. files
id: check_formatting
continue-on-error: true
run: npx prettier . --check --config=prettierrc.toml
- name: Suggestion to fix formatting issues
if: steps.check_formatting.outcome == 'failure'
run:
echo "In project root run 'npx prettier . --write
--config=prettierrc.toml' and commit changes to fix issues."
- name: Force fail if check formatting step failed
if: steps.check_formatting.outcome == 'failure'
run: exit 1