-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from Backblaze/upgrade-tools
Upgrade tools
- Loading branch information
Showing
27 changed files
with
467 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,11 @@ on: | |
push: | ||
branches: [master] | ||
paths-ignore: | ||
- '.github/no-response.yml' | ||
- '.github/workflows/cd.yml' | ||
- 'LICENSE' | ||
- 'README.md' | ||
- 'README.release.md' | ||
pull_request: | ||
branches: [master] | ||
|
||
|
@@ -13,20 +17,20 @@ defaults: | |
shell: bash | ||
|
||
env: | ||
PYTHON_DEFAULT_VERSION: '3.9' | ||
GO_DEFAULT_VERSION: '1.20' | ||
PYTHON_DEFAULT_VERSION: '3.12' | ||
GO_DEFAULT_VERSION: '1.22' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} | ||
uses: actions/setup-python@v2 | ||
uses: deadsnakes/[email protected] # staticx doesn't work with python installed by setup-python action | ||
with: | ||
python-version: ${{ env.PYTHON_DEFAULT_VERSION }} | ||
- name: Set up Go ${{ env.GO_DEFAULT_VERSION }} | ||
uses: actions/setup-go@v2.1.3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_DEFAULT_VERSION }} | ||
- name: Install dependencies | ||
|
@@ -44,34 +48,34 @@ jobs: | |
- 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 | ||
uses: zattoo/changelog@v2 | ||
with: | ||
token: ${{ github.token }} | ||
build: | ||
needs: lint | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ${{ matrix.conf.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-12 # amd64 | ||
- macos-14 # arm64 | ||
- windows-2019 | ||
conf: | ||
- { runner: ubuntu-latest, os: linux, arch: amd64 } | ||
- { runner: macos-12, os: darwin, arch: amd64 } | ||
- { runner: macos-14, os: darwin, arch: arm64 } | ||
- { runner: windows-2019, os: windows, arch: amd64 } | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (ubuntu-latest) | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: deadsnakes/action@v2.1.1 | ||
if: matrix.conf.os == 'linux' | ||
uses: deadsnakes/action@v3.1.0 # staticx doesn't work with python installed by setup-python action | ||
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 | ||
if: matrix.conf.os != 'linux' | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_DEFAULT_VERSION }} | ||
- name: Set up Go ${{ env.GO_DEFAULT_VERSION }} | ||
uses: actions/setup-go@v2.1.3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_DEFAULT_VERSION }} | ||
- name: Install dependencies | ||
|
@@ -81,7 +85,7 @@ jobs: | |
run: | | ||
make build | ||
- name: Upload python bindings | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: py-terraform-provider-b2-${{ runner.os }}-${{ runner.arch }} | ||
path: python-bindings/dist/py-terraform-provider-b2 | ||
|
@@ -93,40 +97,33 @@ jobs: | |
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 }} | ||
runs-on: ${{ matrix.conf.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-12 # amd64 | ||
- macos-14 # arm64 | ||
- windows-2019 | ||
terraform: | ||
- '1.5.*' | ||
- '1.4.*' | ||
exclude: | ||
- os: macos-12 # for macOS, the latest terraform is enough for ACC tests | ||
terraform: '1.4.*' | ||
- os: macos-14 # for macOS, the latest terraform is enough for ACC tests | ||
terraform: '1.4.*' | ||
- os: windows-2019 # for Windows, the latest terraform is enough for ACC tests | ||
terraform: '1.4.*' | ||
conf: | ||
- { runner: ubuntu-latest, os: linux, arch: amd64, terraform: '1.9.*' } | ||
- { runner: ubuntu-latest, os: linux, arch: amd64, terraform: '1.8.*' } | ||
# for macOS, the latest terraform is enough for ACC tests | ||
- { runner: macos-12, os: darwin, arch: amd64, terraform: '1.9.*' } | ||
- { runner: macos-14, os: darwin, arch: arm64, terraform: '1.9.*' } | ||
# for Windows, the latest terraform is enough for ACC tests | ||
- { runner: windows-2019, os: windows, arch: amd64, terraform: '1.9.*' } | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- 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 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_DEFAULT_VERSION }} | ||
- uses: hashicorp/setup-terraform@v2 | ||
name: Set up Terraform ${{ matrix.terraform }} | ||
- uses: hashicorp/setup-terraform@v3 | ||
name: Set up Terraform ${{ matrix.conf.terraform }} | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_version: ${{ matrix.conf.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 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: py-terraform-provider-b2-${{ runner.os }}-${{ runner.arch }} | ||
path: python-bindings/dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ pkged.go | |
*.pyc | ||
*.egg-info | ||
.python-version | ||
b2/py-terraform-provider-b2 | ||
build/ | ||
dist/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.