Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Github Workflows #294

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
39 changes: 21 additions & 18 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Run Go Tests

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
Expand All @@ -9,6 +9,9 @@ on:
pull_request:
paths:
- 'src/openstack_cpi_golang/**'
push:
branches:
- master

jobs:
go:
Expand All @@ -27,23 +30,23 @@ jobs:
with:
go-version-file: src/openstack_cpi_golang/go.mod

- name: Install golangci-lint
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Run golangci-lint
if: ${{ matrix.os != 'windows-2019' }}
uses: golangci/golangci-lint-action@v6
with:
working-directory: src/openstack_cpi_golang

- name: Run golangci-lint and tests on Windows
- name: Run golangci-lint
if: ${{ matrix.os == 'windows-2019' }}
run: |
cd src/openstack_cpi_golang
golangci-lint run
go test ./cpi/...
go test ./integration/...
uses: golangci/golangci-lint-action@v6
with:
working-directory: src/openstack_cpi_golang
args: --disable=goimports

- name: Run golangci-lint and tests on non-Windows
if: ${{ matrix.os != 'windows-2019' }}
run: |
cd src/openstack_cpi_golang
golangci-lint run --enable goimports
go test ./cpi/...
go test ./integration/...
shell: bash
- name: Run unit tests
run: scripts/run-unit-tests
working-directory: src/openstack_cpi_golang

- name: Run integration tests
run: scripts/run-integration-tests
working-directory: src/openstack_cpi_golang
16 changes: 14 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
name: Run Specs
on: [ push, pull_request ]
name: Run Ruby Specs

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
paths:
- 'src/bosh_openstack_cpi/**'
push:
branches:
- master

jobs:
unit_specs:
Expand Down
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://golangci-lint.run/usage/configuration/
run:
timeout: 3m # 1m default times out on github-action runners

output:
# Sort results by: filepath, line and column.
sort-results: true