diff --git a/.github/workflows/run_others_testacc.yml b/.github/workflows/run_others_testacc.yml new file mode 100644 index 000000000..6bbd5473f --- /dev/null +++ b/.github/workflows/run_others_testacc.yml @@ -0,0 +1,42 @@ +name: Others Acceptances tests + +on: + pull_request_target: + branches: + - master + paths: + - '**.go' + - '**.sum' + - '**.mod' + - 'GNUmakefile' + workflow_dispatch: + +jobs: + Others_acceptances_tests: + environment: RUNNER_ACCESS + concurrency: terraform-acceptance-test + runs-on: [self-hosted, linux] + steps: + - uses: actions/checkout@v3 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + - uses: outscale-dev/frieza-github-actions/frieza-clean@master + with: + access_key: ${{ secrets.OSC_ACCESS_KEY }} + secret_key: ${{ secrets.OSC_SECRET_KEY }} + region: ${{ secrets.OSC_REGION }} + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '>=1.18.0' + - name: Build go test + run: make test + - name: Run others acceptance tests + run: make test-others + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} diff --git a/.github/workflows/run_vm_testacc.yml b/.github/workflows/run_vm_testacc.yml new file mode 100644 index 000000000..695d51d65 --- /dev/null +++ b/.github/workflows/run_vm_testacc.yml @@ -0,0 +1,42 @@ +name: vm Acceptances tests + +on: + pull_request_target: + branches: + - master + paths: + - '**.go' + - '**.sum' + - '**.mod' + - 'GNUmakefile' + workflow_dispatch: + +jobs: + Vm_Acceptances_tests: + environment: RUNNER_ACCESS + concurrency: terraform-acceptance-test + runs-on: [self-hosted, linux] + steps: + - uses: actions/checkout@v3 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + - uses: outscale-dev/frieza-github-actions/frieza-clean@master + with: + access_key: ${{ secrets.OSC_ACCESS_KEY }} + secret_key: ${{ secrets.OSC_SECRET_KEY }} + region: ${{ secrets.OSC_REGION }} + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '>=1.18.0' + - name: Build go test + run: make test + - name: Run vm acceptance tests + run: make test-vm + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} diff --git a/GNUmakefile b/GNUmakefile index 1c5be9778..4ea19d88b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -29,6 +29,13 @@ testacc: fmtcheck test-net: fmtcheck TF_ACC=1 go test $(TEST) -run=TestAccNet -count 1 -v -parallel 1 $(TESTARGS) -timeout 240m -cover +.PHONY: test-vm +test-vm: fmtcheck + TF_ACC=1 go test $(TEST) -run=TestAccVM -count 1 -v -parallel 4 $(TESTARGS) -timeout 240m -cover + +.PHONY: test-others +test-others: fmtcheck + TF_ACC=1 go test $(TEST) -run=TestAccOthers -count 1 -v -parallel 4 $(TESTARGS) -timeout 240m -cover .PHONY: fmt fmt: