about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-09 16:48:55 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-12-09 16:48:55 +0100
commite877bb47b87a1704e222ea3ceb22f15619bbe775 (patch)
tree745df9b8c395ac4272884664ca40fe06a28aa4a8 /.github/workflows
parent859db01268bdae0d423ccf97fbeef87eb4f13f0d (diff)
parent4555ecf995899c635f1c5d80d4f94fd422a5300c (diff)
Merge branch 'main' into glitch-soc/main
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/rebase-needed.yml17
-rw-r--r--.github/workflows/test-chart.yml138
2 files changed, 17 insertions, 138 deletions
diff --git a/.github/workflows/rebase-needed.yml b/.github/workflows/rebase-needed.yml
new file mode 100644
index 000000000..6f903ee61
--- /dev/null
+++ b/.github/workflows/rebase-needed.yml
@@ -0,0 +1,17 @@
+name: PR Needs Rebase
+
+on:
+  push:
+  pull_request_target:
+    types: [synchronize]
+
+jobs:
+  label-rebase-needed:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check for merge conflicts
+        uses: eps1lon/actions-label-merge-conflict@releases/2.x
+        with:
+          dirtyLabel: 'rebase needed :construction:'
+          repoToken: '${{ secrets.GITHUB_TOKEN }}'
+          commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
diff --git a/.github/workflows/test-chart.yml b/.github/workflows/test-chart.yml
deleted file mode 100644
index 4d7a27887..000000000
--- a/.github/workflows/test-chart.yml
+++ /dev/null
@@ -1,138 +0,0 @@
-# This is a GitHub workflow defining a set of jobs with a set of steps.
-# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
-#
-name: Test chart
-
-on:
-  pull_request:
-    paths:
-      - 'chart/**'
-      - '!**.md'
-      - '.github/workflows/test-chart.yml'
-  push:
-    paths:
-      - 'chart/**'
-      - '!**.md'
-      - '.github/workflows/test-chart.yml'
-    branches-ignore:
-      - 'dependabot/**'
-  workflow_dispatch:
-
-permissions:
-  contents: read
-
-defaults:
-  run:
-    working-directory: chart
-
-jobs:
-  lint-templates:
-    runs-on: ubuntu-22.04
-
-    steps:
-      - uses: actions/checkout@v3
-      - uses: actions/setup-python@v4
-        with:
-          python-version: '3.x'
-
-      - name: Install dependencies (yamllint)
-        run: pip install yamllint
-
-      - run: helm dependency update
-
-      - name: helm lint
-        run: |
-          helm lint . \
-              --values dev-values.yaml
-
-      - name: helm template
-        run: |
-          helm template . \
-              --values dev-values.yaml \
-              --output-dir rendered-templates
-
-      - name: yamllint (only on templates we manage)
-        run: |
-          rm -rf rendered-templates/mastodon/charts
-
-          yamllint rendered-templates \
-            --config-data "{rules: {indentation: {spaces: 2}, line-length: disable}}"
-
-  # This job helps us validate that rendered templates are valid k8s resources
-  # against a k8s api-server, via "helm template --validate", but also that a
-  # basic configuration can be used to successfully startup mastodon.
-  #
-  test-install:
-    runs-on: ubuntu-22.04
-    timeout-minutes: 15
-
-    strategy:
-      fail-fast: false
-      matrix:
-        include:
-          # k3s-channel reference: https://update.k3s.io/v1-release/channels
-          - k3s-channel: latest
-          - k3s-channel: stable
-
-          # This represents the oldest configuration we test against.
-          #
-          # The k8s version chosen is based on the oldest still supported k8s
-          # version among two managed k8s services, GKE, EKS.
-          # - GKE: https://endoflife.date/google-kubernetes-engine
-          # - EKS: https://endoflife.date/amazon-eks
-          #
-          # The helm client's version can influence what helper functions is
-          # available for use in the templates, currently we need v3.6.0 or
-          # higher.
-          #
-          - k3s-channel: v1.21
-            helm-version: v3.6.0
-
-    steps:
-      - uses: actions/checkout@v3
-
-      # This action starts a k8s cluster with NetworkPolicy enforcement and
-      # installs both kubectl and helm.
-      #
-      # ref: https://github.com/jupyterhub/action-k3s-helm#readme
-      #
-      - uses: jupyterhub/action-k3s-helm@v3
-        with:
-          k3s-channel: ${{ matrix.k3s-channel }}
-          helm-version: ${{ matrix.helm-version }}
-          metrics-enabled: false
-          traefik-enabled: false
-          docker-enabled: false
-
-      - run: helm dependency update
-
-      # Validate rendered helm templates against the k8s api-server
-      - name: helm template --validate
-        run: |
-          helm template --validate mastodon . \
-              --values dev-values.yaml
-
-      - name: helm install
-        run: |
-          helm install mastodon . \
-              --values dev-values.yaml \
-              --timeout 10m
-
-      # This actions provides a report about the state of the k8s cluster,
-      # providing logs etc on anything that has failed and workloads marked as
-      # important.
-      #
-      # ref: https://github.com/jupyterhub/action-k8s-namespace-report#readme
-      #
-      - name: Kubernetes namespace report
-        uses: jupyterhub/action-k8s-namespace-report@v1
-        if: always()
-        with:
-          important-workloads: >-
-            deploy/mastodon-sidekiq
-            deploy/mastodon-streaming
-            deploy/mastodon-web
-            job/mastodon-assets-precompile
-            job/mastodon-chewy-upgrade
-            job/mastodon-create-admin
-            job/mastodon-db-migrate