feat(deps): bump github.com/jarcoal/httpmock from 1.1.0 to 1.3.1 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dev | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
permissions: | |
contents: read | |
jobs: | |
setup_pr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
# Dependabot no longer have access to secrets unless we move to pull_request_target. | |
# Read more: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
# Remove review_ready label when new commit push to PR | |
- name: Remove review_ready label | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'review_ready') }} | |
uses: actions/github-script@v6 | |
with: | |
# Fallback to github action token with limited access | |
# when DevOps token isn't available this happens on dependabot. | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.rest.issues.removeLabel({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: 'review_ready' | |
}) | |
# Add wip label when new commit push to PR | |
- name: Add wip label | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'wip') }} | |
uses: actions/github-script@v6 | |
with: | |
# Fallback to github action token with limited access | |
# when DevOps token isn't available this happens on dependabot. | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['wip'] | |
}) | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.17 | |
cache: false | |
- name: Run Lint | |
uses: golangci/golangci-lint-action@v3 | |
codespell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install codespell | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Check spelling with codespell | |
run: codespell --ignore-words=codespell.txt || exit 1 | |
unit_test: | |
runs-on: ${{ matrix.os }} | |
needs: [setup_pr, lint, codespell] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.17 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Vet | |
run: make vet | |
- name: Test | |
run: make test | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: unit-go-${{ runner.os }} | |
parallel: true | |
path-to-lcov: ./covprofile | |
integration_test: | |
needs: [unit_test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.17 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run Integration Tests | |
run: make testacc | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: integration-go-${{ runner.os }} | |
parallel: true | |
path-to-lcov: ./covprofile | |
coverage: | |
needs: [unit_test, integration_test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload coverage to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
file: ./covprofile |