blob: fb59166677f5c8f5cf6fba5ee1da2819d4895a1d [file] [log] [blame]
---
# golang molecule/default/verify.yml
#
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Verify
hosts: all
tasks:
# go
- name: Check go version
command:
cmd: "go version"
register: go_version
tags:
- skip_ansible_lint # info gathering
- name: Print go version
debug:
var: go_version
- name: Assert go 1.18.x installed
assert:
that:
- "'go version go1.18' in go_version.stdout"
# golangci-lint
- name: Check golangci-lint version
command:
cmd: "golangci-lint --version"
become: true
register: glcil_version
tags:
- skip_ansible_lint # info gathering
- name: Print golangci-lint version
debug:
var: glcil_version
- name: Assert golangci-lint 1.47.x installed
assert:
that:
- "'golangci-lint has version 1.47' in glcil_version.stdout"
# go-junit-report
- name: Check go-junit-report version
command:
cmd: "go-junit-report -version"
become: true
register: gjur_version
tags:
- skip_ansible_lint # info gathering
- name: Print go-junit-report version
debug:
var: gjur_version
- name: Assert go-junit-report 2.0.x installed
assert:
that:
- "'go-junit-report v2.0' in gjur_version.stdout"