Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Moving tests to actions

Michal Rutkacc16add6e761
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 000000000..0d70ff927
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,40 @@
+# This workflow will build a Java project with Gradle
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
+
+name: run tests
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: grant execute permission for gradlew
+ run: chmod +x gradlew
+ - name: start containers needed for testing
+ run: docker-compose -f profile/dev-testing.yml up --no-build -d
+ - name: Check running containers
+ run: docker ps -a
+ - name: tests with Gradle
+ run: ./gradlew clean test
+ - name: Share tests artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: tests-run-artifacts
+ path: |
+ "test/build/reports/tests/test/*"
+ "test/build/reports/tests/test/*/*"
+ retention-days: 30