use go-redis #891
Workflow file for this run
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
--- | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
jobs: | ||
lint: | ||
uses: mackerelio/workflows/.github/workflows/go-lint.yml@main | ||
with: | ||
os-versions: '["ubuntu-latest", "windows-latest"]' | ||
test: | ||
uses: mackerelio/workflows/.github/workflows/go-test.yml@main | ||
with: | ||
os-versions: '["ubuntu-latest", "windows-latest"]' | ||
integration-test-linux: | ||
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@main | ||
with: | ||
os-versions: '["ubuntu-latest"]' | ||
run: | | ||
make testconvention | ||
./test.bash | ||
integration-test-windows: | ||
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@main | ||
with: | ||
os-versions: '["windows-latest"]' | ||
run: | | ||
go build -o mackerel-plugin-mssql/mackerel-plugin-mssql.exe ./mackerel-plugin-mssql | ||
go build -o mackerel-plugin-windows-server-sessions/mackerel-plugin-windows-server-sessions.exe ./mackerel-plugin-windows-server-sessions | ||
build: | ||
needs: [test-linux, integration-test-linux] | ||
Check failure on line 37 in .github/workflows/test.yml GitHub Actions / testInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- run: | | ||
sudo apt-get update | ||
sudo apt-get install -y rpm devscripts debhelper fakeroot crossbuild-essential-arm64 | ||
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.x | ||
- run: make clean rpm deb | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-build-artifacts | ||
path: | | ||
~/rpmbuild/RPMS/*/*.rpm | ||
packaging/*.deb | ||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: linux-build-artifacts | ||
path: artifacts/ | ||
- uses: mackerelio/staging-release-update-action@main | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
directory: artifacts/ | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: staging | ||
- uses: mackerelio/create-release-action@main | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
directory: artifacts/ | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tag-prefix: "refs/tags/v" | ||
bump-up-branch-prefix: "bump-version-" | ||
- uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,message,commit,action,eventName,ref,workflow,job,took | ||
username: mackerel-agent-plugins-release | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.MACKEREL_SLACK_WEBHOOK_URL }} |