mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 02:52:58 +00:00
chore(ci): split acceptance tests into a separate workflow (#1084)
--------- Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
e3ddd6f5fa
commit
e38b45f033
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
@ -74,44 +74,12 @@ jobs:
|
|||||||
- name: Check for uncommitted changes in generated docs
|
- name: Check for uncommitted changes in generated docs
|
||||||
run: make docs && git diff --exit-code
|
run: make docs && git diff --exit-code
|
||||||
|
|
||||||
acceptance:
|
testacc:
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
max-parallel: 1
|
|
||||||
matrix:
|
|
||||||
os: [ ubuntu-latest ]
|
|
||||||
terraform: [ 1.6 ]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
environment: pve-acc
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Invoke acceptance tests workflow
|
||||||
uses: actions/checkout@v4
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
workflow: testacc.yml
|
||||||
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version-file: "go.mod"
|
|
||||||
cache-dependency-path: "**/*.sum"
|
|
||||||
|
|
||||||
- name: Get dependencies
|
|
||||||
run: go mod download
|
|
||||||
|
|
||||||
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
|
|
||||||
with:
|
|
||||||
terraform_version: ${{ matrix.terraform }}.*
|
|
||||||
terraform_wrapper: false
|
|
||||||
|
|
||||||
- name: Acceptance tests
|
|
||||||
timeout-minutes: 10
|
|
||||||
env:
|
|
||||||
TF_ACC: 1
|
|
||||||
PROXMOX_VE_INSECURE: false
|
|
||||||
PROXMOX_VE_API_TOKEN: "${{ secrets.PROXMOX_VE_API_TOKEN }}"
|
|
||||||
PROXMOX_VE_ENDPOINT: "https://${{ secrets.PROXMOX_VE_HOST }}:8006/"
|
|
||||||
PROXMOX_VE_SSH_AGENT: false
|
|
||||||
PROXMOX_VE_SSH_USERNAME: "terraform"
|
|
||||||
PROXMOX_VE_SSH_PRIVATE_KEY: "${{ secrets.PROXMOX_VE_SSH_PRIVATE_KEY }}"
|
|
||||||
run: make testacc
|
|
||||||
|
|
55
.github/workflows/testacc.yml
vendored
Normal file
55
.github/workflows/testacc.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
name: Acceptance Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
description: 'Branch or tag to run tests against'
|
||||||
|
required: true
|
||||||
|
default: 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
acceptance:
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest ]
|
||||||
|
terraform: [ 1.6 ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
environment: pve-acc
|
||||||
|
steps:
|
||||||
|
- run: echo ${{ github.event.workflow_run }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: ${{ github.event.workflow_run.head_branch }}
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: "go.mod"
|
||||||
|
cache-dependency-path: "**/*.sum"
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: go mod download
|
||||||
|
|
||||||
|
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
|
||||||
|
with:
|
||||||
|
terraform_version: ${{ matrix.terraform }}.*
|
||||||
|
terraform_wrapper: false
|
||||||
|
|
||||||
|
- name: Acceptance tests
|
||||||
|
timeout-minutes: 10
|
||||||
|
env:
|
||||||
|
TF_ACC: 1
|
||||||
|
PROXMOX_VE_INSECURE: false
|
||||||
|
PROXMOX_VE_API_TOKEN: "${{ secrets.PROXMOX_VE_API_TOKEN }}"
|
||||||
|
PROXMOX_VE_ENDPOINT: "https://${{ secrets.PROXMOX_VE_HOST }}:8006/"
|
||||||
|
PROXMOX_VE_SSH_AGENT: false
|
||||||
|
PROXMOX_VE_SSH_USERNAME: "terraform"
|
||||||
|
PROXMOX_VE_SSH_PRIVATE_KEY: "${{ secrets.PROXMOX_VE_SSH_PRIVATE_KEY }}"
|
||||||
|
run: make testacc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user