Browse Source

build(gha): Add plugins test suite, move plugins acceptance under acceptance (#21825)

This was a test suite I missed when moving things over. We have moved the plugin acceptance tests into tests/acceptance so that they are ran w/ the rest of the acceptance tests. This saves us from needing the JS stack when running the plugins test suite (thanks @joshuarli).
Billy Vong 4 years ago
parent
commit
2dfb054735

+ 55 - 0
.github/workflows/plugins-test.yml

@@ -0,0 +1,55 @@
+name: plugins
+on:
+  push:
+    branches:
+      - master
+      - releases/**
+  pull_request:
+
+jobs:
+  test:
+    name: plugins test
+    runs-on: ubuntu-16.04
+    timeout-minutes: 10
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Check for python file changes
+        uses: getsentry/paths-filter@v2
+        id: changes
+        with:
+          token: ${{ github.token }}
+          filters: .github/file-filters.yml
+
+      # Until GH composite actions can use `uses`, we need to setup python here
+      - uses: actions/setup-python@v2
+        if: steps.changes.outputs.backend == 'true'
+        with:
+          python-version: 2.7.17
+
+      - name: Setup pip
+        uses: ./.github/actions/setup-pip
+        id: pip
+        if: steps.changes.outputs.backend == 'true'
+
+      - name: pip cache
+        uses: actions/cache@v2
+        if: steps.changes.outputs.backend == 'true'
+        with:
+          path: ${{ steps.pip.outputs.pip-cache-dir }}
+          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-*.txt') }}
+          restore-keys: |
+            ${{ runner.os }}-pip-
+
+      - name: Setup sentry env
+        uses: ./.github/actions/setup-sentry
+        id: setup
+        if: steps.changes.outputs.backend == 'true'
+        with:
+          snuba: true
+          python: 2
+
+      - name: Run test
+        if: steps.changes.outputs.backend == 'true'
+        run: |
+          make test-plugins

+ 0 - 2
Makefile

@@ -184,8 +184,6 @@ test-acceptance: node-version-check
 	make run-acceptance
 
 test-plugins:
-	@echo "--> Building static assets"
-	@$(WEBPACK)
 	@echo "--> Running plugin tests"
 	py.test tests/sentry_plugins -vv --cov . --cov-report="xml:.artifacts/plugins.coverage.xml" --junit-xml=".artifacts/plugins.junit.xml" || exit 1
 	@echo ""

+ 0 - 0
tests/sentry_plugins/acceptance/__init__.py → tests/acceptance/sentry_plugins/__init__.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_amazon_sqs.py → tests/acceptance/sentry_plugins/test_amazon_sqs.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_asana.py → tests/acceptance/sentry_plugins/test_asana.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_bitbucket.py → tests/acceptance/sentry_plugins/test_bitbucket.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_clubhouse.py → tests/acceptance/sentry_plugins/test_clubhouse.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_github.py → tests/acceptance/sentry_plugins/test_github.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_gitlab.py → tests/acceptance/sentry_plugins/test_gitlab.py


+ 0 - 0
tests/sentry_plugins/acceptance/test_jira.py → tests/acceptance/sentry_plugins/test_jira.py


Some files were not shown because too many files changed in this diff