Skip to content

Commit

Permalink
build: update CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jan 14, 2025
1 parent 509c53c commit 70e89d9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 70 deletions.
54 changes: 11 additions & 43 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,31 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: stable
id: go

- name: Run Tests (Linux)
- name: Setup Linux Dependencies
if: runner.os == 'Linux'
run: make check

- name: Run Short Tests (Non-Linux)
if: runner.os != 'Linux'
run: make check

- name: Upload Code Coverage
if: runner.os == 'Linux'
run: bash <(curl -s https://codecov.io/bash)
run: |
apt-get install -y libgl1-mesa-dev and xorg-dev
winbuild:
name: Build (Windows)
runs-on: [ windows-latest ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Setup Windows Dependencies
if: runner.os == 'Windows'
run: |
choco install -y make mingw
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: stable
id: go

- name: Install make (Windows)
run: |
choco install -y make mingw
- name: Run Short Tests (Non-Linux)
run: |
go test ./... -short
- name: Run Tests
run: make check

docker:
name: Docker build
runs-on: [ ubuntu-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: stable
id: go
Expand All @@ -76,18 +56,6 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

# disable and stop mono-xsp4.service
# Details: https://github.com/actions/virtual-environments/issues/2821
- name: Ubuntu 20.04 Cleanup
if: runner.os == 'Linux'
run: |
sudo systemctl disable mono-xsp4.service || true
sudo systemctl stop mono-xsp4.service || true
sudo killall mono || true
- name: Build Frontend
run: make build

- name: Docker Build
if: runner.os == 'Linux'
run: make docker-hub
9 changes: 1 addition & 8 deletions .github/workflows/openshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ jobs:
os: [ ubuntu-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: stable
id: go

- name: Setup Node / NPM
if: runner.os == 'Linux'
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Docker Build
if: runner.os == 'Linux'
run: make docker-openshift
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ jobs:

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Short Tests
if: runner.os == 'Linux'
env:
GOTEST_FLAGS: "-short"
run: make check
run: |
make check
create_release:
name: Create Release
Expand Down Expand Up @@ -66,18 +68,14 @@ jobs:
go-version: stable
id: go

- name: Setup Node / NPM
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
path: release_url

- name: Distribute
run: make dist
Expand All @@ -86,7 +84,7 @@ jobs:
id: get_release_info
shell: bash
run: |
value=`cat release_url.txt`
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
env:
TAG_REF_NAME: ${{ github.ref }}
Expand Down Expand Up @@ -131,7 +129,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: stable
id: go
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,9 @@ jobs:
go-version: stable
id: go

- name: Setup Node / NPM
if: runner.os == 'Linux'
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install make (Windows)
if: runner.os == 'Windows'
run: choco install -y make mingw

- name: Docker Build
if: runner.os == 'Linux'
run: make docker-static

0 comments on commit 70e89d9

Please sign in to comment.