From c04173905f0165926eb0722ae8a354c9085bcc43 Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Fri, 29 Oct 2021 12:36:39 -0400 Subject: [PATCH] Use specific versions, new codecov upload --- .github/workflows/codeql-analysis.yml | 70 +++++++++++++-------------- .github/workflows/run-tests.yml | 18 ++++--- .github/workflows/sync-labels.yml | 8 +-- 3 files changed, 50 insertions(+), 46 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a12999a..5939deb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,8 +11,8 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [master] - schedule: - - cron: '0 23 * * 0' + # schedule: + # - cron: '0 23 * * 0' jobs: analyze: @@ -29,43 +29,43 @@ jobs: # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 + - name: Checkout repository + uses: actions/checkout@v2.3.5 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can check out the head. + fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - #- run: git checkout HEAD^2 - # if: ${{ github.event_name == 'pull_request' }} + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + # - run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1a3d5be..dd121c1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,24 +10,24 @@ on: push: branches: - "*" - schedule: - - cron: '1 4 * * *' +# schedule: +# - cron: '1 4 * * *' jobs: test: strategy: matrix: - go-version: [ 1.14.x, 1.15.x, 1.16.x, 1.17.x ] + go-version: [ 1.15.x, 1.16.x, 1.17.x ] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v2.1.4 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 - - uses: actions/cache@v2 + uses: actions/checkout@v2.3.5 + - uses: actions/cache@v2.1.6 with: path: | ~/go/pkg/mod # Module download cache @@ -40,4 +40,8 @@ jobs: - name: Run linter and tests run: make test-ci - name: Update code coverage - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file + uses: codecov/codecov-action@v2.1.0 + with: + flags: unittests + fail_ci_if_error: true # optional (default = false) + verbose: true # optional (default = false) \ No newline at end of file diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index ddcc195..5849d6b 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -1,6 +1,6 @@ # Workflow: https://github.com/micnncim/action-label-syncer # Export your labels: https://github.com/micnncim/label-exporter -name: Sync labels +name: sync-labels on: push: branches: @@ -11,9 +11,9 @@ jobs: sync-labels: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: micnncim/action-label-syncer@v1 + - uses: actions/checkout@v2.3.5 + - uses: micnncim/action-label-syncer@v1.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - manifest: .github/labels.yml \ No newline at end of file + manifest: .github/labels.yml