From fd1166b9ed826a19dcc2b11845c82953f0e6df3a Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Tue, 4 May 2021 14:57:33 -0700 Subject: [PATCH] Mergify: configuration update (#659) * Mergify: configuration update * cleanup workflows, codecov and mergify --- .github/workflows/.gitignore | 1 + .github/workflows/{push.yml => checks.yml} | 54 +-- .github/workflows/release.yml | 36 ++ .github/workflows/test-composite.yml | 25 -- .github/workflows/test-expressions.yml | 89 ----- .github/workflows/test-if.yml | 406 --------------------- .mergify.yml | 87 +++++ codecov.yml | 3 +- 8 files changed, 134 insertions(+), 567 deletions(-) create mode 100644 .github/workflows/.gitignore rename .github/workflows/{push.yml => checks.yml} (78%) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test-composite.yml delete mode 100644 .github/workflows/test-expressions.yml delete mode 100644 .github/workflows/test-if.yml create mode 100644 .mergify.yml diff --git a/.github/workflows/.gitignore b/.github/workflows/.gitignore new file mode 100644 index 00000000..d1453108 --- /dev/null +++ b/.github/workflows/.gitignore @@ -0,0 +1 @@ +test-*.yml diff --git a/.github/workflows/push.yml b/.github/workflows/checks.yml similarity index 78% rename from .github/workflows/push.yml rename to .github/workflows/checks.yml index 851fb7b6..7d9380a3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/checks.yml @@ -1,9 +1,9 @@ -name: push -on: [push, pull_request, workflow_dispatch] +name: checks +on: [pull_request, workflow_dispatch] jobs: lint: - name: Lint + name: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -22,7 +22,7 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_EXCLUDE: .*testdata/* - VALIDATE_ALL_CODEBASE: ${{ github.event_name != 'pull_request' }} # lint only new changes when pull_request + VALIDATE_ALL_CODEBASE: false VALIDATE_BASH: false VALIDATE_DOCKERFILE: false VALIDATE_DOCKERFILE_HADOLINT: false @@ -30,8 +30,8 @@ jobs: VALIDATE_JSCPD: false VALIDATE_SHELL_SHFMT: false - test: - name: Test on Linux + test-linux: + name: test-linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -59,7 +59,7 @@ jobs: fail_ci_if_error: true # optional (default = false) test-macos: - name: Test on MacOS + name: test-macos runs-on: macos-latest continue-on-error: true # Don't let macos test fail whole workflow env: @@ -105,11 +105,7 @@ jobs: CGO_ENABLED: 0 snapshot: - name: Snapshot - if: ${{ github.event_name == 'pull_request' }} - needs: - - lint - - test + name: snapshot runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -143,37 +139,3 @@ jobs: with: name: act-macos path: dist/act_darwin_amd64/act - - release: - name: Release - if: startsWith(github.ref, 'refs/tags/v') - needs: - - lint - - test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-go@v1 - with: - go-version: 1.16 - - uses: actions/cache@v2 - if: ${{ !env.ACT }} - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: GoReleaser - uses: goreleaser/goreleaser-action@v1 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} - - name: Chocolatey - uses: ./.github/actions/choco - with: - version: ${{ github.ref }} - apiKey: ${{ secrets.CHOCO_APIKEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..890cc356 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: release +on: + push: + tags: + - v* + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v1 + with: + go-version: 1.16 + - uses: actions/cache@v2 + if: ${{ !env.ACT }} + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + - name: Chocolatey + uses: ./.github/actions/choco + with: + version: ${{ github.ref }} + apiKey: ${{ secrets.CHOCO_APIKEY }} diff --git a/.github/workflows/test-composite.yml b/.github/workflows/test-composite.yml deleted file mode 100644 index 2282afc5..00000000 --- a/.github/workflows/test-composite.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "Test composite actions" -on: push - -env: - ACT: true - -jobs: - test-composite-actions: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: "✅ I should echo default 'Hello World'" - id: step0 - uses: ./.github/actions/composite - - - name: "Check action output" - if: steps.step0.outputs.output != 'output string' - run: echo "expected output to be 'output string' but it wasn't" - - - name: "✅ I should echo 'Test string'" - id: step1 - uses: ./.github/actions/composite - with: - input: 'Test string' \ No newline at end of file diff --git a/.github/workflows/test-expressions.yml b/.github/workflows/test-expressions.yml deleted file mode 100644 index 43ff4dbe..00000000 --- a/.github/workflows/test-expressions.yml +++ /dev/null @@ -1,89 +0,0 @@ - -name: "Test how expressions are handled on GitHub" -on: push - -env: - ACT: true - KEY-WITH-HYPHENS: value-with-hyphens - KEYWITHNOTHING: valuewithnothing - KEY_WITH_UNDERSCORES: value_with_underscores - SOMETHING_FALSE: false - SOMETHING_TRUE: true - - -jobs: - test-espressions: - runs-on: ubuntu-latest - steps: - - - name: €{{ 1 }} to €{{ 2 }} -> ${{1}} to ${{2}} should be equal to 1 to 2 - run: echo "Done " - - - name: €{{ env.KEYWITHNOTHING }} -> ${{ env.KEYWITHNOTHING }} should be equal to valuewithnothing - run: echo "Done " - - - name: €{{ env.KEY-WITH-HYPHENS }} -> ${{ env.KEY-WITH-HYPHENS }} should be equal to value-with-hyphens - run: echo "Done " - - - name: €{{ env.KEY_WITH_UNDERSCORES }} -> ${{ env.KEY_WITH_UNDERSCORES }} should be equal to value_with_underscores - run: echo "Done " - - - name: €{{ secrets.CASE_INSENSITIVE_SECRET }} -> ${{ secrets.CASE_INSENSITIVE_SECRET }} should be equal to value - run: echo "Done " - - - name: €{{ secrets.case_insensitive_secret }} -> ${{ secrets.case_insensitive_secret }} should be equal to value - run: echo "Done " - - - name: €{{ env.UNKNOWN }} -> ${{ env.UNKNOWN }} should be equal to - run: echo "Done " - - - name: €{{ env.SOMETHING_TRUE }} -> ${{ env.SOMETHING_TRUE }} should be equal to true - run: echo "Done " - - - name: €{{ env.SOMETHING_FALSE }} -> ${{ env.SOMETHING_FALSE }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_TRUE }} -> ${{ !env.SOMETHING_TRUE }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_FALSE }} -> ${{ !env.SOMETHING_FALSE }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_TRUE && true }} -> ${{ !env.SOMETHING_TRUE && true }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_FALSE && true }} -> ${{ !env.SOMETHING_FALSE && true }} should be equal to false - run: echo "Done " - - - name: €{{ env.SOMETHING_TRUE && true }} -> ${{ env.SOMETHING_TRUE && true }} should be equal to true - run: echo "Done " - - - name: €{{ env.SOMETHING_FALSE && true }} -> ${{ env.SOMETHING_FALSE && true }} should be equal to true - run: echo "Done " - - - name: €{{ !env.SOMETHING_TRUE || true }} -> ${{ !env.SOMETHING_TRUE || true }} should be equal to true - run: echo "Done " - - - name: €{{ !env.SOMETHING_FALSE || true }} -> ${{ !env.SOMETHING_FALSE || true }} should be equal to true - run: echo "Done " - - - name: €{{ !env.SOMETHING_TRUE && false }} -> ${{ !env.SOMETHING_TRUE && false }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_FALSE && false }} -> ${{ !env.SOMETHING_FALSE && false }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_TRUE || false }} -> ${{ !env.SOMETHING_TRUE || false }} should be equal to false - run: echo "Done " - - - name: €{{ !env.SOMETHING_FALSE || false }} -> ${{ !env.SOMETHING_FALSE || false }} should be equal to false - run: echo "Done " - - - name: €{{ env.SOMETHING_TRUE || false }} -> ${{ env.SOMETHING_TRUE || false }} should be equal to true - run: echo "Done " - - - name: €{{ env.SOMETHING_FALSE || false }} -> ${{ env.SOMETHING_FALSE || false }} should be equal to false - run: echo "Done " - - - name: €{{ env.SOMETHING_FALSE }} && €{{ env.SOMETHING_TRUE }} -> ${{ env.SOMETHING_FALSE }} && ${{ env.SOMETHING_TRUE }} should be equal to false && true - run: echo "Done " diff --git a/.github/workflows/test-if.yml b/.github/workflows/test-if.yml deleted file mode 100644 index a0e4dd5d..00000000 --- a/.github/workflows/test-if.yml +++ /dev/null @@ -1,406 +0,0 @@ - -name: "Test what expressions result in true and false on GitHub" -on: push - -env: - ACT: true - SOMETHING_FALSE: false - SOMETHING_TRUE: true - SOME_TEXT: text - - -jobs: - test-ifs-and-buts: - runs-on: ubuntu-latest - steps: - - - name: "❌ I should not run, expr: failure()" - id: step0 - if: failure() - run: echo "failure() should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: success()" - id: step1 - if: success() - run: echo OK - - - name: "Double checking expr: success()" - if: steps.step1.conclusion == 'skipped' - run: echo "success() should have been true, but wasn't" - - - name: "❌ I should not run, expr: cancelled()" - id: step2 - if: cancelled() - run: echo "cancelled() should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: always()" - id: step3 - if: always() - run: echo OK - - - name: "Double checking expr: always()" - if: steps.step3.conclusion == 'skipped' - run: echo "always() should have been true, but wasn't" - - - name: "✅ I should run, expr: true" - id: step4 - if: true - run: echo OK - - - name: "Double checking expr: true" - if: steps.step4.conclusion == 'skipped' - run: echo "true should have been true, but wasn't" - - - name: "❌ I should not run, expr: false" - id: step5 - if: false - run: echo "false should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: 1 != 0" - id: step8 - if: 1 != 0 - run: echo OK - - - name: "Double checking expr: 1 != 0" - if: steps.step8.conclusion == 'skipped' - run: echo "1 != 0 should have been true, but wasn't" - - - name: "❌ I should not run, expr: 1 != 1" - id: step9 - if: 1 != 1 - run: echo "1 != 1 should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ 1 != 0 }}" - id: step10 - if: ${{ 1 != 0 }} - run: echo OK - - - name: "Double checking expr: €{{ 1 != 0 }}" - if: steps.step10.conclusion == 'skipped' - run: echo "${{ 1 != 0 }} should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ 1 != 1 }}" - id: step11 - if: ${{ 1 != 1 }} - run: echo "${{ 1 != 1 }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: 1 == 0" - id: step12 - if: 1 == 0 - run: echo "1 == 0 should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: 1 == 1" - id: step13 - if: 1 == 1 - run: echo OK - - - name: "Double checking expr: 1 == 1" - if: steps.step13.conclusion == 'skipped' - run: echo "1 == 1 should have been true, but wasn't" - - - name: "❌ I should not run, expr: 1 > 2" - id: step14 - if: 1 > 2 - run: echo "1 > 2 should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: 1 < 2" - id: step15 - if: 1 < 2 - run: echo OK - - - name: "Double checking expr: 1 < 2" - if: steps.step15.conclusion == 'skipped' - run: echo "1 < 2 should have been true, but wasn't" - - - name: "❌ I should not run, expr: true && false" - id: step16 - if: true && false - run: echo "true && false should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: true && 1 < 2" - id: step17 - if: true && 1 < 2 - run: echo OK - - - name: "Double checking expr: true && 1 < 2" - if: steps.step17.conclusion == 'skipped' - run: echo "true && 1 < 2 should have been true, but wasn't" - - - name: "✅ I should run, expr: false || 1 < 2" - id: step18 - if: false || 1 < 2 - run: echo OK - - - name: "Double checking expr: false || 1 < 2" - if: steps.step18.conclusion == 'skipped' - run: echo "false || 1 < 2 should have been true, but wasn't" - - - name: "❌ I should not run, expr: false || false" - id: step19 - if: false || false - run: echo "false || false should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: env.UNKNOWN == 'true'" - id: step20 - if: env.UNKNOWN == 'true' - run: echo "env.UNKNOWN == 'true' should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: env.UNKNOWN" - id: step21 - if: env.UNKNOWN - run: echo "env.UNKNOWN should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: env.SOME_TEXT" - id: step22 - if: env.SOME_TEXT - run: echo OK - - - name: "Double checking expr: env.SOME_TEXT" - if: steps.step22.conclusion == 'skipped' - run: echo "env.SOME_TEXT should have been true, but wasn't" - - - name: "✅ I should run, expr: env.SOME_TEXT == 'text'" - id: step23 - if: env.SOME_TEXT == 'text' - run: echo OK - - - name: "Double checking expr: env.SOME_TEXT == 'text'" - if: steps.step23.conclusion == 'skipped' - run: echo "env.SOME_TEXT == 'text' should have been true, but wasn't" - - - name: "✅ I should run, expr: env.SOMETHING_TRUE == 'true'" - id: step24 - if: env.SOMETHING_TRUE == 'true' - run: echo OK - - - name: "Double checking expr: env.SOMETHING_TRUE == 'true'" - if: steps.step24.conclusion == 'skipped' - run: echo "env.SOMETHING_TRUE == 'true' should have been true, but wasn't" - - - name: "❌ I should not run, expr: env.SOMETHING_FALSE == 'true'" - id: step25 - if: env.SOMETHING_FALSE == 'true' - run: echo "env.SOMETHING_FALSE == 'true' should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: env.SOMETHING_TRUE" - id: step26 - if: env.SOMETHING_TRUE - run: echo OK - - - name: "Double checking expr: env.SOMETHING_TRUE" - if: steps.step26.conclusion == 'skipped' - run: echo "env.SOMETHING_TRUE should have been true, but wasn't" - - - name: "✅ I should run, expr: env.SOMETHING_FALSE" - id: step27 - if: env.SOMETHING_FALSE - run: echo OK - - - name: "Double checking expr: env.SOMETHING_FALSE" - if: steps.step27.conclusion == 'skipped' - run: echo "env.SOMETHING_FALSE should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_TRUE }}" - id: step30 - if: ${{ !env.SOMETHING_TRUE }} - run: echo "${{ !env.SOMETHING_TRUE }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_FALSE }}" - id: step31 - if: ${{ !env.SOMETHING_FALSE }} - run: echo "${{ !env.SOMETHING_FALSE }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ ! env.SOMETHING_TRUE }}" - id: step32 - if: ${{ ! env.SOMETHING_TRUE }} - run: echo "${{ ! env.SOMETHING_TRUE }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ ! env.SOMETHING_FALSE }}" - id: step33 - if: ${{ ! env.SOMETHING_FALSE }} - run: echo "${{ ! env.SOMETHING_FALSE }} should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ env.SOMETHING_TRUE }}" - id: step34 - if: ${{ env.SOMETHING_TRUE }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_TRUE }}" - if: steps.step34.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_TRUE }} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE }}" - id: step35 - if: ${{ env.SOMETHING_FALSE }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE }}" - if: steps.step35.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE }} should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_TRUE }}" - id: step36 - if: ${{ !env.SOMETHING_TRUE }} - run: echo "${{ !env.SOMETHING_TRUE }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_FALSE }}" - id: step37 - if: ${{ !env.SOMETHING_FALSE }} - run: echo "${{ !env.SOMETHING_FALSE }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_TRUE && true }}" - id: step38 - if: ${{ !env.SOMETHING_TRUE && true }} - run: echo "${{ !env.SOMETHING_TRUE && true }} should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_FALSE && true }}" - id: step39 - if: ${{ !env.SOMETHING_FALSE && true }} - run: echo "${{ !env.SOMETHING_FALSE && true }} should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ !env.SOMETHING_TRUE || true }}" - id: step40 - if: ${{ !env.SOMETHING_TRUE || true }} - run: echo OK - - - name: "Double checking expr: €{{ !env.SOMETHING_TRUE || true }}" - if: steps.step40.conclusion == 'skipped' - run: echo "${{ !env.SOMETHING_TRUE || true }} should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ !env.SOMETHING_FALSE || false }}" - id: step41 - if: ${{ !env.SOMETHING_FALSE || false }} - run: echo "${{ !env.SOMETHING_FALSE || false }} should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ env.SOMETHING_TRUE && true }}" - id: step42 - if: ${{ env.SOMETHING_TRUE && true }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_TRUE && true }}" - if: steps.step42.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_TRUE && true }} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE || true }}" - id: step43 - if: ${{ env.SOMETHING_FALSE || true }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE || true }}" - if: steps.step43.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE || true }} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE || false }}" - id: step44 - if: ${{ env.SOMETHING_FALSE || false }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE || false }}" - if: steps.step44.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE || false }} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.SOMETHING_TRUE == 'true' }}" - id: step46 - if: ${{ env.SOMETHING_TRUE == 'true'}} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_TRUE == 'true' }}" - if: steps.step46.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_TRUE == 'true'}} should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ env.SOMETHING_FALSE == 'true' }}" - id: step47 - if: ${{ env.SOMETHING_FALSE == 'true'}} - run: echo "${{ env.SOMETHING_FALSE == 'true'}} should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE == 'false' }}" - id: step48 - if: ${{ env.SOMETHING_FALSE == 'false'}} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE == 'false' }}" - if: steps.step48.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE == 'false'}} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE }} && €{{ env.SOMETHING_TRUE }}" - id: step49 - if: ${{ env.SOMETHING_FALSE }} && ${{ env.SOMETHING_TRUE }} - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE }} && €{{ env.SOMETHING_TRUE }}" - if: steps.step49.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE }} && ${{ env.SOMETHING_TRUE }} should have been true, but wasn't" - - - name: "✅ I should run, expr: false || env.SOMETHING_TRUE == 'true'" - id: step50 - if: false || env.SOMETHING_TRUE == 'true' - run: echo OK - - - name: "Double checking expr: false || env.SOMETHING_TRUE == 'true'" - if: steps.step50.conclusion == 'skipped' - run: echo "false || env.SOMETHING_TRUE == 'true' should have been true, but wasn't" - - - name: "✅ I should run, expr: true || env.SOMETHING_FALSE == 'true'" - id: step51 - if: true || env.SOMETHING_FALSE == 'true' - run: echo OK - - - name: "Double checking expr: true || env.SOMETHING_FALSE == 'true'" - if: steps.step51.conclusion == 'skipped' - run: echo "true || env.SOMETHING_FALSE == 'true' should have been true, but wasn't" - - - name: "✅ I should run, expr: true && env.SOMETHING_TRUE == 'true'" - id: step52 - if: true && env.SOMETHING_TRUE == 'true' - run: echo OK - - - name: "Double checking expr: true && env.SOMETHING_TRUE == 'true'" - if: steps.step52.conclusion == 'skipped' - run: echo "true && env.SOMETHING_TRUE == 'true' should have been true, but wasn't" - - - name: "❌ I should not run, expr: false && env.SOMETHING_TRUE == 'true'" - id: step53 - if: false && env.SOMETHING_TRUE == 'true' - run: echo "false && env.SOMETHING_TRUE == 'true' should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: env.SOMETHING_FALSE == 'true' && env.SOMETHING_TRUE == 'true'" - id: step54 - if: env.SOMETHING_FALSE == 'true' && env.SOMETHING_TRUE == 'true' - run: echo "env.SOMETHING_FALSE == 'true' && env.SOMETHING_TRUE == 'true' should be false, but was evaluated to true;" exit 1; - - - name: "❌ I should not run, expr: env.SOMETHING_FALSE == 'true' && true" - id: step55 - if: env.SOMETHING_FALSE == 'true' && true - run: echo "env.SOMETHING_FALSE == 'true' && true should be false, but was evaluated to true;" exit 1; - - - name: "✅ I should run, expr: €{{ env.SOMETHING_FALSE == 'true' }} && true" - id: step56 - if: ${{ env.SOMETHING_FALSE == 'true' }} && true - run: echo OK - - - name: "Double checking expr: €{{ env.SOMETHING_FALSE == 'true' }} && true" - if: steps.step56.conclusion == 'skipped' - run: echo "${{ env.SOMETHING_FALSE == 'true' }} && true should have been true, but wasn't" - - - name: "✅ I should run, expr: true && €{{ env.SOMETHING_FALSE == 'true' }}" - id: step57 - if: true && ${{ env.SOMETHING_FALSE == 'true' }} - run: echo OK - - - name: "Double checking expr: true && €{{ env.SOMETHING_FALSE == 'true' }}" - if: steps.step57.conclusion == 'skipped' - run: echo "true && ${{ env.SOMETHING_FALSE == 'true' }} should have been true, but wasn't" - - - name: "✅ I should run, expr: €{{ env.ACT }}" - id: step60 - if: ${{ env.ACT }} - run: echo OK - - - name: "Double checking expr: €{{ env.ACT }}" - if: steps.step60.conclusion == 'skipped' - run: echo "${{ env.ACT }} should have been true, but wasn't" - - - name: "❌ I should not run, expr: €{{ !env.ACT }}" - id: step61 - if: ${{ !env.ACT }} - run: echo "${{ !env.ACT }} should be false, but was evaluated to true;" exit 1; diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..3a10469f --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,87 @@ +pull_request_rules: + - name: warn on conflicts + conditions: + - conflict + actions: + comment: + message: "@{{author}} this pull request is now in conflict 😩" + label: + add: + - conflict + - name: remove conflict label if not needed + conditions: + - -conflict + actions: + label: + remove: + - conflict + - name: warn on needs-work + conditions: + - "#check-failure>=1" + actions: + comment: + message: "@{{author}} this pull request has failed checks 🛠" + label: + add: + - needs-work + - name: remove needs-work label if not needed + conditions: + - check-success=lint + - check-success=test-linux + - check-success=test-macos + - check-success=codecov/patch + - check-success=codecov/project + - check-success=snapshot + actions: + label: + remove: + - needs-work + - name: Automatic maintainer assignment + conditions: + - -draft + - -merged + - -closed + - -conflict + - check-success=lint + - check-success=test-linux + - check-success=test-macos + - check-success=codecov/patch + - check-success=codecov/project + - check-success=snapshot + actions: + request_reviews: + teams: + - "@nektos/act-maintainers" + - name: Automatic committer assignment + conditions: + - "approved-reviews-by=@nektos/act-maintainers" + - -draft + - -merged + - -closed + - -conflict + - check-success=lint + - check-success=test-linux + - check-success=test-macos + - check-success=codecov/patch + - check-success=codecov/project + - check-success=snapshot + actions: + request_reviews: + teams: + - "@nektos/act-committers" + - name: Automatic merge on approval + conditions: + - "#changes-requested-reviews-by=0" + - "approved-reviews-by=@nektos/act-committers" + - -draft + - -merged + - -closed + - check-success=lint + - check-success=test-linux + - check-success=test-macos + - check-success=codecov/patch + - check-success=codecov/project + - check-success=snapshot + actions: + merge: + method: squash diff --git a/codecov.yml b/codecov.yml index d00a55f2..af55497c 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,6 +3,7 @@ coverage: project: default: target: auto # auto compares coverage to the previous base commit + threshold: 1% patch: default: - target: 100% + target: 80%