Add plugins from external repositories. #1030
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Statick | |
on: # NOLINT | |
pull_request: | |
push: | |
schedule: | |
- cron: '0 10 * * MON' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-latest] | |
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install .[docs,test] | |
# Remove apt repos that are known to break from time to time. | |
# See https://github.com/actions/virtual-environments/issues/323 | |
- name: Remove broken apt repos [Ubuntu] | |
if: runner.os == 'Linux' | |
run: | | |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | |
- name: Install tools (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install cccc | |
sudo apt-get install chktex | |
sudo apt-get install clang | |
sudo apt-get install clang-format | |
sudo apt-get install clang-tidy | |
sudo apt-get install cppcheck | |
sudo apt-get install lacheck | |
sudo apt-get install libpcre3-dev | |
sudo apt-get install libperl-critic-perl | |
sudo apt-get install libxml2 | |
sudo apt-get install libxml2-utils | |
sudo apt-get install shellcheck | |
sudo apt-get install uncrustify | |
git clone https://github.com/KCL-Planning/VAL | |
cd VAL/scripts/linux | |
sh build_linux64.sh all Release | |
cd ../../.. | |
mkdir -p /opt/val/bin/ | |
cp -r VAL/build/linux64/Release/install/bin/* /opt/val/bin/ | |
rm -rf VAL | |
- name: Install clang tools (for unit tests) | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install clang-format-14 | |
sudo apt-get install clang-tidy-14 | |
# Do not install on macos until there is a hadolint release for macos (Darwin on arm64 architecture). | |
- name: Install Hadolint binary (github) | |
if: runner.os == 'Linux' || runner.os == 'Windows' | |
run: | | |
mkdir -p $HOME/.local/bin | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
curl -sL -o hadolint https://github.com/hadolint/hadolint/releases/download/v2.6.0/hadolint-$(uname -s)-$(uname -m) | |
chmod +x hadolint | |
mv hadolint $HOME/.local/bin/ | |
- name: Install Hadolint docker image (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
docker pull hadolint/hadolint:latest | |
- name: Install node tools | |
if: runner.os == 'Linux' | |
run: | | |
npm install -g dockerfile_lint | |
npm install -g dockerfilelint | |
npm install -g htmllint-cli | |
npm install -g jshint | |
npm install -g markdownlint-cli | |
npm install -g npm-groovy-lint | |
npm install -g postcss-html # needed for stylelint to process html | |
npm install -g prettier | |
npm install -g stylelint | |
npm install -g stylelint-config-standard | |
npm install -g write-good | |
npm install -g eslint | |
# eslint plugins and configs should be installed locally | |
# https://eslint.org/docs/user-guide/migrating-to-6.0.0#plugins-and-shareable-configs-are-no-longer-affected-by-eslints-location | |
npm install --prefix $HOME/.node_modules --save-dev eslint-plugin-html | |
npm install --prefix $HOME/.node_modules --save-dev eslint-plugin-prettier | |
npm install --prefix $HOME/.node_modules --save-dev eslint-config-prettier | |
npm install --prefix $HOME/.node_modules --save-dev eslint @eslint/js | |
# View versions of installed packages | |
npm list | |
npm list --prefix $HOME/.node_modules | |
npm list -g | |
- name: Test with mypy | |
run: | | |
mypy --ignore-missing-imports --strict src/statick_tool/ | |
- name: Statick markdown | |
if: runner.os == 'Linux' | |
run: | | |
statick . --check --level documentation --log info | |
- name: Sphinx lint | |
if: runner.os == 'Linux' | |
uses: ammaraskar/sphinx-action@master | |
with: | |
docs-folder: 'docs/' | |
- name: Test with tox | |
run: | | |
python -m tox | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: false | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Self check | |
if: runner.os == 'Linux' | |
run: | | |
mkdir statick-output | |
statick . --output-directory statick-output --check --profile self_check.yaml --log INFO |