Skip to content

Goreleaser update

Goreleaser update #174

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [master]
paths-ignore:
- 'README.md'
pull_request:
branches: [master]
env:
PYTHON_DEFAULT_VERSION: '3.9'
GO_DEFAULT_VERSION: '1.20'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Set up Go ${{ env.GO_DEFAULT_VERSION }}
uses: actions/setup-go@v2.1.3
with:
go-version: ${{ env.GO_DEFAULT_VERSION }}
- name: Install dependencies
run: |
make deps
- name: Run dependency checker
run: |
make deps-check
- name: Run linters
run: |
make lint
- name: Run docs linters
run: |
make docs-lint
- name: Validate changelog
# Library was designed to be used with pull requests only.
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
uses: zattoo/changelog@v1
with:
token: ${{ github.token }}
build:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-11
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
uses: deadsnakes/action@v2.1.1
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
if: matrix.os != 'ubuntu-latest'
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Set up Go ${{ env.GO_DEFAULT_VERSION }}
uses: actions/setup-go@v2.1.3
with:
go-version: ${{ env.GO_DEFAULT_VERSION }}
- name: Install dependencies
run: |
make deps
- name: Build the provider
run: |
make build
- name: Upload python bindings
uses: actions/upload-artifact@v2
with:
name: py-terraform-provider-b2-${{ runner.os }}
path: python-bindings/dist/py-terraform-provider-b2
if-no-files-found: error
retention-days: 1
test:
needs: build
env:
B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
NOPYBINDINGS: 1 # do not build python buildings
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-11
terraform:
- '1.5.*'
- '1.4.*'
exclude:
- os: macos-11 # for macOS, the latest terraform is enough for ACC tests
terraform: '1.4.*'
steps:
- uses: actions/checkout@v2
- name: Set up Go ${{ env.GO_DEFAULT_VERSION }}
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
uses: actions/setup-go@v2.1.3
with:
go-version: ${{ env.GO_DEFAULT_VERSION }}
- uses: hashicorp/setup-terraform@v2
name: Set up Terraform ${{ matrix.terraform }}
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Download python bindings for given OS
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
uses: actions/download-artifact@v2
with:
name: py-terraform-provider-b2-${{ runner.os }}
path: python-bindings/dist/
- name: Run acceptance tests
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
timeout-minutes: 120
run: |
make testacc