Skip to content

build(deps): bump codecov/codecov-action from 6 to 7 #189

build(deps): bump codecov/codecov-action from 6 to 7

build(deps): bump codecov/codecov-action from 6 to 7 #189

Workflow file for this run

name: Lint
on:
workflow_call:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
permissions:
pull-requests: read
contents: read
jobs:
lint-commits:
runs-on: ubuntu-22.04
if: github.actor != 'dependabot[bot]'
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check commits
uses: wagoid/commitlint-github-action@v6
lint-markdown:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Lint markdown files
uses: avto-dev/markdown-lint@v1.5.0
with:
args: "**/*.md"
ignore: "CHANGELOG.md docs/**/*.md"
lint-yaml:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Lint yaml files
uses: ibiqlik/action-yamllint@v3.1.1
lint-typos:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install codespell
run: |
pip install codespell==2.3.0
- name: Check for spelling errors
run: |
codespell --config .codespellrc
exit $?
lint-erlang:
runs-on: ubuntu-22.04
env:
ERL_FLAGS: "-enable-feature all"
OTP_VERSION: "27"
REBAR3_VERSION: "3.24.0"
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Setup Erlang/OTP and rebar3
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
rebar3-version: ${{ env.REBAR3_VERSION }}
- name: Restore _build folder
uses: actions/cache@v5
with:
path: _build
key: "_build-cache-for\
-otp-${{ env.OTP_VERSION }}\
-rebar3-${{ env.REBAR3_VERSION }}\
-hash-${{ hashFiles('rebar.lock') }}"
- name: Restore rebar3's cache
uses: actions/cache@v5
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-otp-${{ env.OTP_VERSION }}\
-rebar3-${{ env.REBAR3_VERSION }}\
-hash-${{ hashFiles('rebar.lock') }}"
- name: Lint Erlang code (elvis)
run: |
rebar3 lint
- name: Update dialyzer PLT
run: |
rebar3 dialyzer --update-plt || true
- name: Run dialyzer
run: |
rebar3 dialyzer
- name: Ensure code is formatted
run: |
rebar3 fmt --check
- name: Ensure doc is generating
run: |
rebar3 ex_doc
check-readme-updated:
runs-on: ubuntu-22.04
env:
ERL_FLAGS: "-enable-feature all"
OTP_VERSION: "27"
REBAR3_VERSION: "3.24.0"
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Setup Erlang/OTP and rebar3
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
rebar3-version: ${{ env.REBAR3_VERSION }}
- name: Restore _build folder
uses: actions/cache@v5
with:
path: _build
key: "_build-cache-for\
-otp-${{ env.OTP_VERSION }}\
-rebar3-${{ env.REBAR3_VERSION }}\
-hash-${{ hashFiles('rebar.lock') }}"
- name: Restore rebar3's cache
uses: actions/cache@v5
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-otp-${{ env.OTP_VERSION }}\
-rebar3-${{ env.REBAR3_VERSION }}\
-hash-${{ hashFiles('rebar.lock') }}"
- name: Update demo in README.md
run: |
escript .github/scripts/sync_readme.escript
- name: Verify changed readme files
uses: tj-actions/verify-changed-files@v20
id: verify-changed-readme-files
with:
files: |
README.md
- name: Fail if README.md changed
if: steps.verify-changed-readme-files.outputs.files_changed == 'true'
run: |
echo "❌ README.md has been updated."
echo " Changed files : ${{ steps.verify-changed-readme-files.outputs.changed_files }}"
git diff --name-only | grep 'README.md' | while read file; do
echo "‣ Changes in $file:"
git diff HEAD $file
done
echo "Please generate readme using \`escript .github/scripts/sync_readme.escript\` then commit this new documentation."
exit 1