mirror of
https://github.com/gradle/actions.git
synced 2025-04-16 15:59:18 +08:00
This PR bumps references to Develocity Gradle plugin from 3.19.2 to 4.0. --------- Co-authored-by: daz <daz@gradle.com>
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: CI-check-and-unit-test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'release/**'
|
|
paths-ignore:
|
|
- 'dist/**'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check-format-and-unit-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: sources/package-lock.json
|
|
- name: Setup Gradle
|
|
# Use a released version to avoid breakages
|
|
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
|
|
env:
|
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
|
with:
|
|
gradle-version: '8.13'
|
|
|
|
- name: Install npm dependencies
|
|
run: |
|
|
npm clean-install
|
|
working-directory: sources
|
|
|
|
- name: Check formatting and compile
|
|
run: |
|
|
npm run check
|
|
npm run compile
|
|
working-directory: sources
|
|
env:
|
|
NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
|
|
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
npm test
|
|
working-directory: sources
|
|
env:
|
|
NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
|
|
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|