Add github test workflow 21659-gh-workflow-tests
authorStephen Smith <stephen@curii.com>
Mon, 8 Apr 2024 02:18:17 +0000 (22:18 -0400)
committerStephen Smith <stephen@curii.com>
Mon, 8 Apr 2024 17:37:12 +0000 (13:37 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

.github/workflows/tests.yml [new file with mode: 0644]

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644 (file)
index 0000000..f8224e4
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+name: Arvados Tests
+
+on:
+  workflow_dispatch:
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  workbench2:
+    name: Workbench2 Tests
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+      - name: Setup buildx
+        uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
+      - name: Build wb2 test container
+        uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
+        with:
+          context: .
+          file: "services/workbench2/docker/Dockerfile"
+          tags: workbench2-test:latest
+          load: true
+          cache-from: type=gha
+          cache-to: type=gha,mode=max
+          push: false
+      - name: Run wb2 integration tests
+        uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
+        with:
+          image: workbench2-test:latest
+          options: -v ${{github.workspace}}:/usr/src/arvados -w /usr/src/arvados/services/workbench2
+          run: |
+            yarn install
+            yarn test --no-watchAll --bail --ci || exit $?
+            tools/run-integration-tests.sh -a /usr/src/arvados