Skip to content

SYSENG-1727: Rework virtual server resource #398

SYSENG-1727: Rework virtual server resource

SYSENG-1727: Rework virtual server resource #398

Workflow file for this run

name: Code quality
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
env:
GO_VERSION: 1.21
jobs:
docs-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
- name: Check for spelling errors
run: make misspell
- name: Check HCL format
run: make terrafmt
code-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
- name: Check code format
run: make fmtcheck
- name: Lint code
run: make go-lint
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
- name: run depscheck
run: make depscheck
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
- name: run unit tests
run: make test
integration-tests:
if: ${{ ! github.event.pull_request.draft && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
- name: run integration tests and post coverage to codeclimate
uses: paambaati/codeclimate-action@v5.0.0
env:
ANEXIA_LOCATION_ID: 52b5f6b2fd3a4a7eaaedf1a7c019e9ea
ANEXIA_VLAN_ID: 00a239d617504e4ab49122efe0d27657
ANEXIA_TOKEN: ${{ secrets.ANEXIA_TOKEN }}
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_COVERAGE_ID }}
# poor girls ternary operator
TESTARGS: ${{ (github.ref_type != 'tag' && github.ref_name != 'main') && '-short' || '' }}
with:
prefix: github.com/anexia-it/terraform-provider-anxcloud
coverageCommand: make testacc
coverageLocations: coverage.out:gocov