From e51afefdccd041d30aad74e1a8917e21e170ed76 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 9 Jul 2024 10:04:40 +0200 Subject: [PATCH] Imported workflows from main branch --- .github/workflows/build.yaml | 12 ++++---- .github/workflows/lint.yaml | 56 ++++++++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 82bff480b..ccf7d4db0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,7 +20,7 @@ jobs: os: [buildjet-4vcpu-ubuntu-2204, windows-latest, macos-latest] fail-fast: true env: - CODE_VERSION: "1.75.1" + CODE_VERSION: "1.82.3" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: - name: setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 18.15 cache: 'npm' cache-dependency-path: rascal-vscode-extension/package-lock.json registry-url: 'https://registry.npmjs.org' @@ -68,7 +68,7 @@ jobs: if: matrix.os == 'macos-latest' working-directory: ./rascal-vscode-extension env: - DELAY_FACTOR: 10 + DELAY_FACTOR: 15 _JAVA_OPTIONS: '-Xmx4G' run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests @@ -82,7 +82,7 @@ jobs: run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests - name: Upload Screenshots - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: screenshots-${{ matrix.os }} @@ -108,7 +108,7 @@ jobs: - name: setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 18.15 cache: 'npm' cache-dependency-path: rascal-vscode-extension/package-lock.json registry-url: 'https://registry.npmjs.org' @@ -129,7 +129,7 @@ jobs: run: | npm ci npm run license-check - npm run compile + npm run esbuild npm run lint npm run compile-tests npm run normalTest diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 943cea0c7..d96c3ed16 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -26,6 +26,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # sonar needs full checkout for better blame information - uses: actions/setup-java@v4 with: java-version: 17 @@ -41,7 +43,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -f ./rascal-lsp/pom.xml -Pcoverage -B -Drascal.compile.skip verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=usethesource_rascal-language-servers + run: mvn -f ./rascal-lsp/pom.xml -Pcoverage -B -Drascal.compile.skip -Drascal.tutor.skip verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=usethesource_rascal-language-servers eslint: name: eslint @@ -51,7 +53,7 @@ jobs: - name: setup node uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 cache: 'npm' cache-dependency-path: rascal-vscode-extension/package-lock.json registry-url: 'https://registry.npmjs.org' @@ -67,3 +69,53 @@ jobs: eslint_dir: ./rascal-vscode-extension eslint_args: "src" eslint_extensions: ts + + + githubql: + strategy: + matrix: + include: + - language: java + build-mode: manual + - language: typescript + build-mode: none + name: githubql + runs-on: ubuntu-latest + timeout-minutes: 360 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - if: ${{ matrix.language == 'java' }} + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'maven' + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - if: ${{ matrix.language == 'java' }} + name: Build java + run: mvn -B compile -Drascal.compile.skip -Drascal.tutor.skip -DskipTests + working-directory: rascal-lsp/ + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" \ No newline at end of file