From 10e569947b43d973b621a32bf293d1cd75d8a934 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Tue, 17 Aug 2021 18:04:27 +0530 Subject: [PATCH 1/3] chore: fix test workflow --- .github/workflows/cron-test.yml | 32 ++++++++++++++++++++++++++++++ .github/workflows/test.yml | 35 +-------------------------------- 2 files changed, 33 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/cron-test.yml diff --git a/.github/workflows/cron-test.yml b/.github/workflows/cron-test.yml new file mode 100644 index 000000000..556ab6e41 --- /dev/null +++ b/.github/workflows/cron-test.yml @@ -0,0 +1,32 @@ +on: + schedule: + - cron: '0 10 * * *' +name: Cron Test +jobs: + test: + strategy: + matrix: + go-version: [1.16.x] + platform: [ubuntu-latest] + k8s: + - v1.18.6 + - v1.20.7 + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Install yq + run: | + sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -o /usr/bin/yq + sudo chmod +x /usr/bin/yq + - name: Test + env: + KUBERNETES_VERSION: ${{matrix.k8s}} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + TEST_FOLDER: fixtures-cron + run: ./test/e2e.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88a13102b..f6487e917 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,37 +30,4 @@ jobs: - name: Test env: KUBERNETES_VERSION: ${{matrix.k8s}} - run: ./test/e2e.sh ---- -on: - schedule: - - cron: '0 10 * * *' -name: Cron Test -jobs: - test: - strategy: - matrix: - go-version: [1.16.x] - platform: [ubuntu-latest] - k8s: - - v1.18.6 - - v1.20.7 - runs-on: ${{ matrix.platform }} - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Install yq - run: | - sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -o /usr/bin/yq - sudo chmod +x /usr/bin/yq - - name: Test - env: - KUBERNETES_VERSION: ${{matrix.k8s}} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TEST_FOLDER: fixtures-cron - run: ./test/e2e.sh + run: ./test/e2e.sh \ No newline at end of file From 6444f1c22df2c5dcd5cf94b4dfc1e2d751194f6e Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Tue, 17 Aug 2021 18:08:45 +0530 Subject: [PATCH 2/3] chore: fix paths for github workflows --- .github/workflows/lint.yml | 6 ++++++ .github/workflows/test.yml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fdbfa3c73..6e5796133 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,11 +3,17 @@ on: push: branches: - master + paths: + - "**.go" + - "Makefile" + - "**.yaml" + - '**.yml' pull_request: paths: - "**.go" - "Makefile" - "**.yaml" + - '**.yml' jobs: golangci: name: lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6487e917..9732396c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,17 @@ on: - v* branches: - master + paths: + - "**.go" + - "Makefile" + - "**.yaml" + - '**.yml' pull_request: + paths: + - "**.go" + - "Makefile" + - "**.yaml" + - '**.yml' name: Test jobs: test: From 6865fcff311b919536c0f1c3f54ee83ed7f17c1e Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Tue, 17 Aug 2021 19:23:12 +0530 Subject: [PATCH 3/3] chore: run test workflow on every change in test dir --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9732396c1..9372034fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,14 @@ on: - "Makefile" - "**.yaml" - '**.yml' + - 'test/**' pull_request: paths: - "**.go" - "Makefile" - "**.yaml" - '**.yml' + - 'test/**' name: Test jobs: test: