Skip to content

Commit 358e02f

Browse files
committed
[PLUTO-1411] Pr fixes
1 parent b5cafc1 commit 358e02f

File tree

10 files changed

+59
-46
lines changed

10 files changed

+59
-46
lines changed

.github/workflows/go.yml

-42
Original file line numberDiff line numberDiff line change
@@ -49,48 +49,6 @@ jobs:
4949
run: |
5050
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --force-coverage-parser go -r unit.coverage.out
5151
52-
ittest:
53-
needs: build
54-
runs-on: ${{ matrix.os }}
55-
strategy:
56-
matrix:
57-
os: [ubuntu-latest, macos-latest, windows-latest]
58-
steps:
59-
- name: Checkout
60-
uses: actions/checkout@v4
61-
- name: Download CLI binaries
62-
uses: actions/download-artifact@v4
63-
with:
64-
name: cli-binaries
65-
path: .
66-
- name: Select correct binary
67-
shell: bash
68-
run: |
69-
if [ "${{ matrix.os }}" = "windows-latest" ]; then
70-
# Keep the .exe extension for Windows
71-
echo "Using Windows binary with .exe extension"
72-
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
73-
mv cli-v2-macos cli-v2
74-
else
75-
mv cli-v2-linux cli-v2
76-
fi
77-
- name: Make binary executable
78-
if: matrix.os != 'windows-latest'
79-
run: chmod +x cli-v2
80-
- name: Install dependencies from .codacy/codacy.yaml
81-
if: matrix.os != 'windows-latest'
82-
run: |
83-
./cli-v2 install
84-
- name: Install dependencies from .codacy/codacy.yaml (Windows)
85-
if: matrix.os == 'windows-latest'
86-
shell: pwsh
87-
run: |
88-
Get-ChildItem
89-
Write-Host "Current directory contents:"
90-
dir
91-
Write-Host "Attempting to run CLI..."
92-
.\cli-v2.exe install
93-
9452
# For now we are not releasing the CLI, as we are making some quicker iterations
9553
release:
9654
needs: [test, ittest]

.github/workflows/it-test.yml

+59-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88

99
jobs:
10-
test:
10+
build:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
@@ -19,14 +19,69 @@ jobs:
1919
go-version: '1.21'
2020
cache: true
2121

22-
- name: Build CLI
22+
- name: Build CLI for Linux
23+
run: |
24+
GOOS=linux GOARCH=amd64 go build -o cli-v2-linux ./cli-v2.go
25+
26+
- name: Build CLI for Windows
2327
run: |
24-
go build -o cli-v2 ./cli-v2.go
25-
chmod +x cli-v2
28+
GOOS=windows GOARCH=amd64 go build -o cli-v2.exe ./cli-v2.go
29+
30+
- name: Build CLI for macOS
31+
run: |
32+
GOOS=darwin GOARCH=amd64 go build -o cli-v2-macos ./cli-v2.go
33+
34+
- name: Upload CLI binaries
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: cli-binaries
38+
path: |
39+
cli-v2-linux
40+
cli-v2.exe
41+
cli-v2-macos
42+
43+
test:
44+
needs: build
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
matrix:
48+
os: [ubuntu-latest, macos-latest, windows-latest]
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Go
54+
uses: actions/setup-go@v5
55+
with:
56+
go-version: '1.21'
57+
cache: true
58+
59+
- name: Download CLI binaries
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: cli-binaries
63+
path: .
64+
65+
- name: Select correct binary
66+
shell: bash
67+
run: |
68+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
69+
# Keep the .exe extension for Windows
70+
echo "Using Windows binary with .exe extension"
71+
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
72+
mv cli-v2-macos cli-v2
73+
else
74+
mv cli-v2-linux cli-v2
75+
fi
76+
77+
- name: Make binary executable
78+
if: matrix.os != 'windows-latest'
79+
run: chmod +x cli-v2
2680

2781
- name: Run plugin tests
2882
id: run_tests
2983
continue-on-error: true
84+
shell: bash
3085
run: |
3186
# Make the script executable
3287
chmod +x run-tool-tests.sh

0 commit comments

Comments
 (0)