Skip to content

Commit

Permalink
refine all github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
M00nF1sh committed Sep 20, 2022
1 parent ff01714 commit c5ad2da
Show file tree
Hide file tree
Showing 16 changed files with 323 additions and 361 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/build-multi-arch.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/closed-issue-message.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/cron-test.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/forked-pr-tests.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Integration tests

on:
push:
branches:
- "master"
- "release*"

permissions:
id-token: write
contents: read

jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@v3
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Set up tools
run: |
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@latest
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin/
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.OSS_TEST_ROLE_ARN }}
role-duration-seconds: 7200
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Run e2e tests
env:
DISABLE_PROMPT: true
S3_BUCKET_CREATE: false
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
ROLE_CREATE: false
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
RUN_CONFORMANCE: true
run: |
./scripts/run-integration-tests.sh
48 changes: 0 additions & 48 deletions .github/workflows/integration-tests.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/issue-closed-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Closed Issue Message
on:
issues:
types: [closed]

permissions:
issues: write

jobs:
auto_comment:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/closed-issue-message@v1
with:
# These inputs are both required
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
### ⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
26 changes: 26 additions & 0 deletions .github/workflows/issue-stale-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Stale issue & PR handler"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
id: stale
with:
ascending: true
close-issue-message: "Issue closed due to inactivity."
close-pr-message: "Pull request closed due to inactivity."
days-before-close: 14
days-before-stale: 60
exempt-issue-labels: "triage-pending,review-pending"
operations-per-run: 100
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days"
stale-pr-message: "This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days"
45 changes: 45 additions & 0 deletions .github/workflows/nightly-cron-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Nightly Cron tests

on:
schedule:
- cron: "0 3 * * *" # every night

permissions:
id-token: write
contents: read

jobs:
nightly-cron-test:
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@v3
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Set up tools
run: |
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@latest
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin/
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.OSS_TEST_ROLE_ARN }}
role-duration-seconds: 7200
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Run e2e tests
env:
DISABLE_PROMPT: true
S3_BUCKET_CREATE: false
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
ROLE_CREATE: false
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
RUN_CONFORMANCE: true
run: |
./scripts/run-integration-tests.sh
Loading

0 comments on commit c5ad2da

Please sign in to comment.