Skip to content

Merge pull request #3816 from Hannah-Sten/slow-operations #3643

Merge pull request #3816 from Hannah-Sten/slow-operations

Merge pull request #3816 from Hannah-Sten/slow-operations #3643

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
types: [opened, synchronize, ready_for_review]
merge_group:
# Cancel builds if a new commit is pushed, except on master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
qodana:
name: Qodana
# Note: updating to ubuntu-latest may slow the build and produce a "The runner has received a shutdown signal."
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Generate lexer/parser
run: ./gradlew setupDependencies
- uses: JetBrains/qodana-action@main
name: Qodana
with:
post-pr-comment: false
pr-mode: false
args: >
--baseline,qodana.sarif.json,
--source-directory,src
cache-default-branch-only: true
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
# https://www.jetbrains.com/help/qodana/github.html#GitHub+code+scanning
- name: Upload SARIF report to GitHub
# Also upload report if quality gate fails
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
test:
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: configure Pagefile
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@v1.4
with:
minimum-size: 8GB
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Run linting
run: |
chmod +x gradlew
./gradlew ktlintCheck
- name: Run tests
run: ./gradlew check koverXmlReport
- name: Upload coverage report
if: success() && matrix.os == 'ubuntu-latest'
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}