Skip to content

Commit

Permalink
chore(gh-actions): update github actions to latest stable versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-github committed Jun 22, 2024
1 parent 84f7b79 commit fc536c9
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 146 deletions.
File renamed without changes.
File renamed without changes.
64 changes: 32 additions & 32 deletions .github/workflows/acceptance_tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: acceptance tests
on:
schedule:
- cron: "0 6 * * 0,3"

jobs:
acceptance_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
.bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Run acceptance tests
env:
CLOUDSIGMA_USERNAME: ${{ secrets.CLOUDSIGMA_USERNAME }}
CLOUDSIGMA_PASSWORD: ${{ secrets.CLOUDSIGMA_PASSWORD }}
CLOUDSIGMA_LOCATION: ${{ secrets.CLOUDSIGMA_LOCATION }}
run: make testacc
#name: acceptance tests
#on:
# schedule:
# - cron: "0 6 * * 0,3"
#
#jobs:
# acceptance_tests:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.17
#
# - name: Set up cache
# uses: actions/cache@v2
# with:
# path: |
# ~/go/pkg/mod
# .bin
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: ${{ runner.os }}-go-
#
# - name: Run acceptance tests
# env:
# CLOUDSIGMA_USERNAME: ${{ secrets.CLOUDSIGMA_USERNAME }}
# CLOUDSIGMA_PASSWORD: ${{ secrets.CLOUDSIGMA_PASSWORD }}
# CLOUDSIGMA_LOCATION: ${{ secrets.CLOUDSIGMA_LOCATION }}
# run: make testacc
17 changes: 0 additions & 17 deletions .github/workflows/codespell.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Install tools
run: make tools

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Generate changelog
run: |
mkdir -p .bin
tools/bin/git-chglog -c .github/changelog/config.yaml -o .bin/DRAFT.md $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release -f .github/goreleaser.yaml --clean --release-notes=.bin/DRAFT.md
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 0 additions & 55 deletions .github/workflows/release.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Tests

on:
pull_request:
paths-ignore:
- "CHANGELOG.md"
- "README.md"
push:
branches: [main]
paths-ignore:
- "CHANGELOG.md"
- "README.md"

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Build provider
run: make build

unit-tests:
name: unit tests
runs-on: ubuntu-latest
needs: build
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum', 'tools/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Install tools
run: make tools

- name: Lint source code
run: make lint

- name: Run unit tests
run: make test
42 changes: 0 additions & 42 deletions .github/workflows/unit_tests.yml

This file was deleted.

0 comments on commit fc536c9

Please sign in to comment.