Update github actions permissions for release #3124
Workflow file for this run
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
# Workflow to run tests | |
name: CI | |
on: | |
push: | |
branches: [ main, '[0-9]+.[0-9]+.[0-9]+-release*' ] | |
pull_request: | |
branches: [ main, '[0-9]+.[0-9]+.[0-9]+-release*' ] | |
workflow_dispatch: | |
branches: [ main, '[0-9]+.[0-9]+.[0-9]+-release*' ] | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
is_pull_request: | |
- ${{ github.event_name == 'pull_request' }} | |
exclude: | |
# Don't run slow targets on pull request. | |
- is_pull_request: true | |
os: macos-latest | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: configure Pagefile | |
if: matrix.os == 'windows-latest' | |
uses: al-cheb/[email protected] | |
with: | |
minimum-size: 8 | |
maximum-size: 16 | |
disk-root: "D:" | |
- name: Setup Java 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
java-package: jdk | |
architecture: x64 | |
# Checkout | |
- uses: actions/checkout@v2 | |
# Build cache | |
- name: Cache Gradle Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }} | |
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Cache gradle wrapper | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
# Check API compatibility | |
- name: API compatibility check | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew :api:checkApi | |
# Run tests | |
- name: test | |
shell: bash | |
run: ./gradlew --stacktrace --info check | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports-${{ matrix.branch }}-${{ matrix.os }} | |
path: | | |
compiler-plugin/build/reports | |
integration-tests/build/reports | |
gradle-plugin/build/reports | |
common-util/build/reports | |
kotlin-analysis-api/build/reports |