2024-03-10 19:25:19 +01:00
|
|
|
---
|
|
|
|
name: Run tests
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
test-precommit:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
2025-02-23 10:46:28 +01:00
|
|
|
image: docker.io/library/node:16-alpine
|
2024-03-10 19:25:19 +01:00
|
|
|
steps:
|
2025-02-23 10:46:28 +01:00
|
|
|
- name: Install tests dependencies
|
|
|
|
run: apk -Uuv add python3 py3-requests py3-urllib3 py3-pip py3-debian py3-chardet py3-pylint git bash
|
|
|
|
- name: Install pre-commit
|
|
|
|
run: pip install pre-commit
|
2024-03-10 19:25:19 +01:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Run pre-commit
|
2025-02-23 10:46:28 +01:00
|
|
|
run: |
|
|
|
|
git config --global --add safe.directory "$(pwd)"
|
|
|
|
pre-commit run --all-files || { cat /root/.cache/pre-commit/pre-commit.log; exit 1; }
|