[Dart] Update CI (#15981)

* [dart] Update CI

* cache maven dependencies
* use newest exec plugin
* execute pub via dart subcommand

* Use run command directly
This commit is contained in:
Peter Leibiger 2023-07-10 05:27:01 +02:00 committed by GitHub
parent f34e42b249
commit 75067b2581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 26 deletions

View File

@ -22,22 +22,14 @@ jobs:
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies cache: maven
uses: actions/cache@v3
env:
cache-name: maven-repository
with:
path: |
~/.m2/repository
~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Cache test dependencies - name: Cache test dependencies
uses: actions/cache@v3 uses: actions/cache@v3
env: env:
cache-name: pub-cache cache-name: pub-cache
with: with:
path: $PUB_CACHE path: $PUB_CACHE
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.*') }}
- uses: dart-lang/setup-dart@v1 - uses: dart-lang/setup-dart@v1
with: with:
sdk: 2.15.0 sdk: 2.15.0

View File

@ -24,7 +24,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions> <executions>
<execution> <execution>
<id>pub-get</id> <id>pub-get</id>
@ -33,8 +32,9 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>
@ -46,7 +46,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>run</argument> <argument>run</argument>
<argument>build_runner</argument> <argument>build_runner</argument>

View File

@ -24,7 +24,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions> <executions>
<execution> <execution>
<id>pub-get</id> <id>pub-get</id>
@ -33,8 +32,9 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>
@ -46,7 +46,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>run</argument> <argument>run</argument>
<argument>build_runner</argument> <argument>build_runner</argument>

View File

@ -24,7 +24,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions> <executions>
<execution> <execution>
<id>pub-get</id> <id>pub-get</id>
@ -33,8 +32,9 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>
@ -46,7 +46,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>run</argument> <argument>run</argument>
<argument>build_runner</argument> <argument>build_runner</argument>

View File

@ -24,7 +24,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions> <executions>
<execution> <execution>
<id>pub-get</id> <id>pub-get</id>
@ -33,8 +32,9 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>
@ -46,7 +46,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>run</argument> <argument>run</argument>
<argument>build_runner</argument> <argument>build_runner</argument>

View File

@ -24,7 +24,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions> <executions>
<execution> <execution>
<id>pub-get</id> <id>pub-get</id>
@ -33,8 +32,9 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>
@ -46,7 +46,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>run</argument> <argument>run</argument>
<argument>build_runner</argument> <argument>build_runner</argument>
@ -89,8 +89,9 @@
</goals> </goals>
<configuration> <configuration>
<workingDirectory>../petstore_client_lib_fake_tests</workingDirectory> <workingDirectory>../petstore_client_lib_fake_tests</workingDirectory>
<executable>pub</executable> <executable>dart</executable>
<arguments> <arguments>
<argument>pub</argument>
<argument>get</argument> <argument>get</argument>
</arguments> </arguments>
</configuration> </configuration>