如何在 Github actions 中为 Kotlin 运行自动化测试?
语言:科特林, 我的 build.yml 文件是:
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Run the Gradle package task
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
- name: Grant Permissions to gradlew
run: chmod +x gradlew
- name: Test
run: ./gradlew test
它正确地看到测试文件。但有一个测试必须失败。但它成功传递了 GitHub 操作。如何在 GitHub actions 中正确运行测试?
Language: Kotlin,
my build.yml file is:
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Run the Gradle package task
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
- name: Grant Permissions to gradlew
run: chmod +x gradlew
- name: Test
run: ./gradlew test
It sees the test file correctly. But there is a test that has to fail. Yet it successfully passes in GitHub actions. How can I run tests correctly in GitHub actions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论