Skip to content

Fix golangci-lint

Fix golangci-lint #20

Workflow file for this run

name: Test
on: push
jobs:
lambda_tests:
permissions:
contents: read
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
steps:
- uses: actions/checkout@v4
- name: Run tests
run: |
pip install pip --upgrade
pip install pyopenssl --upgrade
pip install -r functions/replace-route/requirements.txt
pip install -r functions/replace-route/tests/test_requirements.txt
python -m pytest
golang_lint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
# use config in .golangci.yaml to configure the action further
# terraform_tests:
# permissions:
# id-token: write
# contents: read
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./test
# steps:
# - uses: actions/checkout@v4
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version-file: test/go.mod
# cache-dependency-path: test/go.sum
# - name: Go Tidy
# run: go mod tidy && git diff --exit-code
# - name: Go Mod
# run: go mod download
# - name: Go mod verify
# run: go mod verify
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.TERRATEST_ROLE_TO_ASSUME }}
# aws-region: ${{ secrets.AWS_REGION }}
# - name: Run tests
# run: go test -v -timeout 60m