Skip to content

refactor(cspell-io): URLs must be URLs and not filenames #9483

refactor(cspell-io): URLs must be URLs and not filenames

refactor(cspell-io): URLs must be URLs and not filenames #9483

name: Integration Tests
on:
pull_request:
paths:
- "packages/**/package.json"
- "packages/**/*-lock.yaml"
- "packages/**/*.ts"
- "integration-tests/**"
- "package.json"
- "*-lock.yaml"
- ".github/workflows/integration-test.yml"
- "!docs/**"
# push:
# branches:
# - main
# paths:
# - "packages/**/package.json"
# - "packages/**/*-lock.yaml"
# - "packages/**/*.ts"
# - "integration-tests/**"
# - "package.json"
# - "*-lock.yaml"
# - ".github/workflows/integration-test.yml"
# - "!docs/**"
# Run on demand
workflow_dispatch:
inputs:
ref:
description: Optional Branch or hash
required: false
permissions:
contents: read
env:
RUNS_ON: ubuntu-latest
NODE_VERSION: "18.x"
NPM_VERSION: "9"
jobs:
pre-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pre-build and cache
id: build-and-cache
uses: ./.github/actions/build-for-integrations
with:
show-summary: true
use-setup: true
prepare:
runs-on: ubuntu-latest
env:
REF_BRANCH: ${{ github.event.inputs.ref || github.ref }}
outputs:
ref: ${{ env.REF_BRANCH }}
runs_on: ${{ env.RUNS_ON }}
node_version: ${{ env.NODE_VERSION }}
repos: ${{ steps.load-integrations.outputs.repos }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Start Prepare
uses: ./.github/actions/summary
with:
text: |
# Prepare Integration
- ref: "${{ env.REF_BRANCH }}"
- runs_on: "${{ env.RUNS_ON }}"
- node_version: ${{ env.NODE_VERSION }}
- name: load-integrations
id: load-integrations
uses: ./.github/actions/list-integration-repos
- name: Refs
uses: ./.github/actions/summary
with:
text: |
## Integrations
```json
${{ steps.load-integrations.outputs.repos }}
```
- name: Pre-build and cache
uses: ./.github/actions/build-for-integrations
with:
show-summary: true
node-version: ${{ env.NODE_VERSION }}
use-setup: true
- name: Done
uses: ./.github/actions/summary
with:
text: |
## Done
integration-tests:
needs:
- prepare
- pre-build
runs-on: ${{ matrix.os }}
env:
REF_BRANCH: ${{ needs.prepare.outputs.ref }}
strategy:
# the integration tests are independent, so we want to run them all.
fail-fast: false
matrix:
node-version:
- ${{ needs.prepare.outputs.node_version }}
os:
- ${{ needs.prepare.outputs.runs_on }}
# List of repositories to check.
# Use `repo-list.sh` in `integration-tests` to generate.
repo: ${{ fromJSON(needs.prepare.outputs.repos) }}
# repo:
# - prettier/prettier
# - typescript-eslint/typescript-eslint
steps:
- name: Checkout
uses: actions/checkout@v4
- id: repo-hash
uses: ./.github/actions/echo
with:
value: >-
${{ hashFiles(
'integration-tests/tsconfig.json',
'integration-tests/config/repositories/${{matrix.repo}}/**',
'integration-tests/snapshots/${{ matrix.repo }}/*',
'integration-tests/repositories/*',
'integration-tests/src/**/*.ts', 'integration-tests/tsconfig.json',
'packages/*/src/**/*.ts', 'packages/*/tsconfig.json',
'packages/*/*.ts',
'*-lock.yaml'
) }}
- name: Repo Info
id: step-repo-info
run: |
echo "repo-info=$(jq -c '.repositories[] | select(.path == "${{ matrix.repo }}")' integration-tests/config/config.json)" >> $GITHUB_OUTPUT
- uses: ./.github/actions/echo
with:
value: |
step.repo-hash: "${{ steps.repo-hash.outputs.value }}"
env.repo-info: ${{ steps.step-repo-info.outputs.repo-info }}
$repo-hash
- name: Cache Integration Run
id: step-cache-run
uses: actions/cache@v3
with:
key: integration-run-result-${{ steps.repo-hash.outputs.value }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}
# We just need a path, its contents isn't important. We really just care if the key was cached.
path: |
integration-tests/tsconfig.json
- uses: ./.github/actions/echo
with:
value: |
Run Cache: ${{ steps.step-cache-run.outputs.cache-hit && 'Hit' || 'Miss' }}
- name: Setup Env
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
- id: step-cache-build
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
uses: ./.github/actions/build-for-integrations
- uses: ./.github/actions/echo
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
with:
value: |
Run Cache: ${{ steps.step-cache-run.outputs.cache-hit && 'Hit' || 'Miss' }}
- name: Cache Integration Test Repository Files
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
uses: actions/cache@v3
with:
key: int-repo-temp-files-${{ matrix.repo }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}
path: |
integration-tests/repositories/temp/${{ matrix.repo }}
- name: Run Integration Tests ${{ matrix.repo }}
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
cd integration-tests
&& pnpm i
&& pnpm run integration-tests -- ${{ matrix.repo }}
# cspell:ignore apollographql
# cspell:ignore aspnetboilerplate
# cspell:ignore caddyserver
# cspell:ignore logiciel twbs
# cspell:ignore MartinThoma googleapis
# cspell:ignore plasticrake tplink smarthome