add script to check for license files #1730
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: Test dotfiles | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
pages: write | |
pull-requests: write | |
on: | |
push: | |
branches: | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: 41 11 * * 0 | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
with: | |
severity: style | |
# Prevent SC1090/SC1091. Will fail if we have too many scripts. | |
# Check usage of "-x" or "external-sources=true" then. | |
check_together: 'yes' | |
ignore_paths: nvim/tests/test-efm | |
env: | |
SHELLCHECK_OPTS: -s bash | |
build: | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-12] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: '.dotfiles' | |
fetch-depth: 40 | |
- name: Install git-perf | |
uses: kaihowl/git-perf/.github/actions/install@master | |
- run: | | |
cd .dotfiles/ | |
git config --global user.email "git-perf@example.com" | |
git config --global user.name "git-perf" | |
- name: Install and test | |
env: | |
VERSION_RUNNER_OS: ${{ matrix.os }} | |
shell: bash | |
run: | | |
env | |
export XDG_CONFIG_HOME=~/.config | |
# Don't care about outdated, broken linkages on CI. | |
# Otherwise, this might update node or php. | |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
# Make `infocmp` for nvim healthcheck succeed | |
export TERM=dumb | |
# Ignore potentially insecure directories on GitHub actions runner. | |
export ZSH_DISABLE_COMPFIX=true | |
cd .dotfiles/ | |
./script/ci.sh | |
- name: Rename versions report | |
if: always() | |
run: | | |
cd .dotfiles/ | |
mv versions.txt versions-${{matrix.os}}.txt | |
- name: Archive version report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: versions-report-${{matrix.os}} | |
path: .dotfiles/versions-*.txt | |
if-no-files-found: error | |
report: | |
name: git-perf | |
needs: build | |
if: always() | |
uses: kaihowl/git-perf/.github/workflows/report.yml@master | |
with: | |
additional-args: '-s os' |