Skip to content

Commit

Permalink
[ci] Use GitHub token to avoid ripgrep download issue
Browse files Browse the repository at this point in the history
In a recent CI run, I noticed this error:
"Downloading ripgrep failed: Error: Request failed: 403"

This happens because of GitHub has limits when anonymously accessing
its API, which we do when downloading ripgrep. There's an easy fix:
use an auto-generated GitHub token when building the Theia app.

Also tidied-up the workflow file a little, to make it easier to read.

Signed-off-by: Marc Dumais <[email protected]>
  • Loading branch information
marcdumais-work committed Dec 15, 2023
1 parent 3b6004e commit dfa77bd
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: CI

on:
push:
Expand All @@ -9,6 +9,7 @@ on:
jobs:

build-and-test:
name: Build and test
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -42,13 +43,18 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: Build
run: yarn --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

- run: yarn test
- name: Test
run: yarn test
env:
CI: true

code-lint:
name: Lint and check format
runs-on: ubuntu-latest

steps:
Expand All @@ -60,7 +66,11 @@ jobs:
node-version: '16'

# ESLint and Prettier must be in `package.json`
- run: yarn --frozen-lockfile --ignore-scripts
- name: Install npm dependencies
run: yarn --frozen-lockfile --ignore-scripts

- name: Lint
run: yarn lint

- run: yarn lint
- run: yarn format:check
- name: Check format
run: yarn format:check

0 comments on commit dfa77bd

Please sign in to comment.