Fixed CI #2496
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| typos-check: | |
| name: Spell Check with Typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Actions Repository | |
| uses: actions/checkout@v6 | |
| - name: Check spelling with custom config file | |
| uses: crate-ci/typos@v1.14.8 | |
| with: | |
| config: ./typos.toml | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run oxlint | |
| uses: oxc-project/oxlint-action@v3.0.0 | |
| with: | |
| working-directory: packages/foam-vscode | |
| config: .oxlintrc.json | |
| all-files: 'true' | |
| test: | |
| name: Build and Test | |
| # strategy: | |
| # matrix: | |
| # os: [macos-12, ubuntu-22.04, windows-2022] | |
| # runs-on: ${{ matrix.os }} | |
| runs-on: ubuntu-22.04 | |
| # env: | |
| # OS: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Restore Dependencies and VS Code test instance | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| node_modules | |
| */*/node_modules | |
| packages/foam-vscode/.vscode-test | |
| key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'packages/foam-vscode/src/test/run-tests.ts') }}-${{ secrets.CACHE_VERSION }} | |
| - name: Install Dependencies | |
| run: yarn | |
| - name: Build Packages | |
| run: yarn build | |
| - name: Test @foam/core | |
| run: yarn workspace @foam/core test | |
| - name: Test @foam/graph-view | |
| run: yarn workspace @foam/graph-view test | |
| - name: Test @foam/cli | |
| run: yarn workspace @foam/cli test | |
| - name: Test foam-vscode | |
| run: xvfb-run --auto-servernum yarn workspace foam-vscode test | |
| docs-site-verify: | |
| name: Docs Site Verify | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Restore Dependencies and VS Code test instance | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| node_modules | |
| */*/node_modules | |
| packages/foam-vscode/.vscode-test | |
| key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'packages/foam-vscode/src/test/run-tests.ts') }}-${{ secrets.CACHE_VERSION }} | |
| - name: Install Dependencies | |
| run: yarn | |
| - name: Build @foam/core | |
| run: yarn workspace @foam/core build | |
| - name: Publish Foam Docs Site | |
| run: yarn publish:docs-site | |
| - name: Verify Generated Site Shape | |
| run: | | |
| test -f ./.tmp/foam-docs-site/package.json | |
| test -f ./.tmp/foam-docs-site/generated/site-config.json | |
| test -f ./.tmp/foam-docs-site/public/publish-routes.json | |
| test -f ./.tmp/foam-docs-site/src/content/docs/index.md | |
| test ! -e ./.tmp/foam-docs-site/src/content/docs/dev |