Act (nektos / act) integration tests failed and doesn't use properties

52 views Asked by At

When I use act --container-architecture linux/amd64 -j integration-tests command I have few errors at the beginning (Idk if it matters)

I use Gradle 8.2.1 and Java 17

| Starting a Gradle Daemon (subsequent builds will be faster)
| Caught exception: Couldn't poll for events, error = 4
| Error while receiving file changes
| net.rubygrapefruit.platform.NativeException: Couldn't poll for events, error = 4
|         at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.executeRunLoop0(Native Method)
|         at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.executeRunLoop(AbstractNativeFileEventFunctions.java:42)
|         at net.rubygrapefruit.platform.internal.jni.AbstractFileEventFunctions$AbstractFileWatcher$1.run(AbstractFileEventFunctions.java:154)

After that, everything is fine before I run my integration tests:

| > Task :ngo-backend:spotbugsMain
Pass 2: Analyzing classes (758 / 758) - 100% complete
| Done with analysis
| 
| > Task :ngo-backend:integrationTests
| 
| NgoBackendApplication > shouldStartBackendApplicationWhenMainMethodIsInvoked() FAILED
|     java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:143
|         Caused by: org.springframework.context.ApplicationContextException at ServletWebServerApplicationContext.java:164
|             Caused by: org.springframework.boot.web.server.WebServerException at TomcatWebServer.java:142
|                 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:533
|                     Caused by: java.lang.IllegalArgumentException at PropertyPlaceholderHelper.java:180
| 
| StaticPageResourceTest > shouldUploadImageFileReference() FAILED
|     java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:143
|         Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
|             Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
|                 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:533
|                     Caused by: java.lang.IllegalArgumentException at PropertyPlaceholderHelper.java:180

this error is for each integration test

My structure:

└── src
    ├── IntegrationTest
        ├── java
        └── resources

My integration-test.yml

name: Integration Tests

on:
  workflow_dispatch:

env:
  GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }}

jobs:
  integration-tests:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up JDK 1.17
        uses: actions/setup-java@v3
        with:
          java-version: 17
          distribution: 'zulu'

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Restore gradle.properties
        shell: bash
        run: |
          mkdir -p ~/.gradle/
          echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
          echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties

      - name: Run Integration Tests
        run: ./gradlew integrationTests --continue

I want to fix the bug and run the Github action locally

0

There are 0 answers