Bump cross-spawn from 7.0.3 to 7.0.6 #1836
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 | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
# ClangFormat | |
- name: Install ClangFormat (Linux) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: sudo apt-get install -y clang-format | |
- name: Install ClangFormat (macOS) | |
if: startsWith(matrix.os, 'macos') | |
run: brew install clang-format | |
# Go | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19.4 | |
- name: Install Go dependencies | |
run: | | |
cd ./test/linters/projects/golint | |
go install golang.org/x/lint/golint@latest | |
# Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
cache-dependency-path: | | |
yarn.lock | |
test/linters/projects/**/yarn.lock | |
.github/workflows/test.yml | |
- name: Install Node.js dependencies | |
run: | | |
cd ./test/linters/projects/eslint/ | |
yarn install | |
cd ../eslint-typescript/ | |
yarn install | |
cd ../prettier/ | |
yarn install | |
cd ../stylelint/ | |
yarn install | |
cd ../tsc/ | |
yarn install | |
cd ../xo/ | |
yarn install | |
# PHP | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "7.4" | |
coverage: none | |
tools: phpcs | |
# Python | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: "pip" | |
cache-dependency-path: | | |
test/linters/projects/**/requirements.txt | |
.github/workflows/test.yml | |
- name: Install Python dependencies | |
run: | | |
cd ./test/linters/projects/ | |
pip install -r ./autopep8/requirements.txt -r ./black/requirements.txt -r ./flake8/requirements.txt -r ./mypy/requirements.txt -r ./oitnb/requirements.txt -r ./pylint/requirements.txt | |
# Ruby | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.7 | |
bundler: 2 | |
- name: Set up bundle cache | |
uses: actions/cache@v4 | |
with: | |
path: ./test/linters/projects/**/vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('./test/linters/projects/**/Gemfile.lock', '.github/workflows/test.yml') }} | |
- name: Install Ruby dependencies (Rubocop) | |
run: | | |
cd ./test/linters/projects/rubocop/ | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Install Ruby dependencies (ERB Lint) | |
run: | | |
cd ./test/linters/projects/erblint/ | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
# Swift (only on Linux) | |
- name: Set up Swift cache (Linux) | |
id: cache-swift | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/cache@v4 | |
with: | |
path: ./swift-format/.build | |
key: ${{ runner.os }}-swift-509.0.0 | |
- name: Install Swift dependencies (Linux, uncached) | |
if: steps.cache-swift.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') | |
run: | | |
git clone --branch 509.0.0 --depth 1 https://github.com/apple/swift-format | |
cd swift-format | |
swift build -c release | |
echo "${PWD}/.build/release" >> $GITHUB_PATH | |
- name: Install Swift dependencies (Linux, cached) | |
if: steps.cache-swift.outputs.cache-hit == 'true' && startsWith(matrix.os, 'ubuntu') | |
run: | | |
echo "${PWD}/swift-format/.build/release" >> $GITHUB_PATH | |
# Swift (only on macOS) | |
- name: Set up Mint cache (macOS) | |
if: startsWith(matrix.os, 'macos') | |
uses: actions/cache@v4 | |
with: | |
path: ~/.mint | |
key: ${{ runner.os }}-mint-${{ hashFiles('./test/linters/projects/**/Mintfile', '.github/workflows/test.yml') }} | |
- name: Install Swift dependencies (macOS) | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
brew install mint | |
cd ./test/linters/projects/swift-format-lockwood/ | |
mint bootstrap --link --overwrite=y | |
cd ../swiftlint/ | |
mint bootstrap --link --overwrite=y | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0.x" | |
# Tests | |
- name: Install test dependencies | |
run: yarn install | |
- name: Run tests | |
run: yarn test |