Skip to content

Commit

Permalink
ci: Use built-in duplicate detection (#279)
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Heba Elayoty <31887807+helayoty@users.noreply.github.com>
Co-authored-by: Heba Elayoty <31887807+helayoty@users.noreply.github.com>
  • Loading branch information
cpuguy83 and helayoty authored Oct 7, 2022
1 parent 446831d commit b936bef
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 57 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: e2e-tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request_target:
branches: [master]
paths-ignore: [ docs/**, "**.md", "**.mdx", "**.png", "**.jpg" ]
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
push:
branches: [master]
paths-ignore: [ docs/**, "**.md", "**.mdx", "**.png", "**.jpg" ]
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]

permissions:
id-token: write
Expand All @@ -18,23 +22,8 @@ env:
GO_VERSION: '1.18'

jobs:
detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false

export-registry:
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
outputs:
registry: ${{ steps.export.outputs.registry }}
steps:
Expand All @@ -48,7 +37,7 @@ jobs:
environment: test
env:
REGISTRY: ${{ needs.export-registry.outputs.registry }}
E2E_IMG_TAG: "e2e-ci"
E2E_IMG_TAG: "e2e-ci"
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ env.GO_VERSION }}
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Lint

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -14,21 +18,6 @@ env:
# Common versions
GO_VERSION: '1.18'

jobs:

detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false

lint:
name: "Lint"
runs-on: ubuntu-latest
Expand Down
37 changes: 13 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
name: azure-aci-test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches: [master]
paths-ignore: [ docs/**, "**.md", "**.mdx", "**.png", "**.jpg" ]
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
pull_request_target:
branches: [master]
paths-ignore: [ docs/**, "**.md", "**.mdx", "**.png", "**.jpg" ]
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]

env:
# Common versions
GO_VERSION: '1.18'

jobs:
detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false

tests:
env:
ACTIVEDIRECTORYENDPOINTURL: 'https://login.microsoftonline.com'
RESOURCEMANAGERENDPOINTURL: 'https://management.azure.com/'
ACTIVEDIRECTORYGRAPHRESOURCEID: 'https://login.microsoftonline.com'
SQLMANAGEMENTENDPOINTURL: 'https://management.core.windows.net:8443/'
GALLERYENDPOINTURL: 'https://gallery.azure.com/'
MANAGEMENTENDPOINTURL: 'https://manage.windowsazure.com/'
ACTIVEDIRECTORYENDPOINTURL: "https://login.microsoftonline.com"
RESOURCEMANAGERENDPOINTURL: "https://management.azure.com/"
ACTIVEDIRECTORYGRAPHRESOURCEID: "https://login.microsoftonline.com"
SQLMANAGEMENTENDPOINTURL: "https://management.core.windows.net:8443/"
GALLERYENDPOINTURL: "https://gallery.azure.com/"
MANAGEMENTENDPOINTURL: "https://manage.windowsazure.com/"
CLIENTSECRET: ${{ secrets.CLIENT_SECRET }}
WORKSPACEKEY: ${{ secrets.OMS_WORKSPACE_KEY }}

runs-on: ubuntu-latest
environment: test
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
Expand Down Expand Up @@ -68,7 +57,7 @@ jobs:
omsworkspaceID: ${{ secrets.OMSWORKSPACEID }}
omsworkspaceKey: ${{ secrets.OMS_WORKSPACE_KEY }}
run: |
make testauth test
make testauth test
- name: Upload Codecov report
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit b936bef

Please sign in to comment.