Skip to content

Commit 7b5085f

Browse files
authored
Merge pull request #142 from roadrunner-server/fix/return-correct-error
2 parents a930720 + 780ec78 commit 7b5085f

File tree

12 files changed

+50
-58
lines changed

12 files changed

+50
-58
lines changed

.github/workflows/linux.yml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: grpc
2-
32
on:
43
push:
54
branches:
@@ -9,106 +8,71 @@ on:
98
branches:
109
- master
1110
- stable
12-
1311
jobs:
1412
grpc_test:
1513
name: gRPC plugin (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}})
1614
runs-on: ${{ matrix.os }}
1715
timeout-minutes: 60
1816
strategy:
1917
matrix:
20-
php: [ "8.4" ]
21-
go: [ stable ]
22-
os: [ "ubuntu-latest" ]
18+
php: ["8.5"]
19+
go: [stable]
20+
os: ["ubuntu-latest"]
2321
steps:
2422
- name: Set up Go ${{ matrix.go }}
2523
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
2624
with:
2725
go-version: ${{ matrix.go }}
28-
2926
- name: Set up PHP ${{ matrix.php }}
3027
uses: shivammathur/setup-php@v2 # action page: <https://github.com/shivammathur/setup-php>
3128
with:
3229
php-version: ${{ matrix.php }}
3330
extensions: sockets
34-
3531
- name: Check out code
3632
uses: actions/checkout@v4
37-
3833
- name: Get Composer Cache Directory
3934
id: composer-cache
4035
run: |
4136
cd tests/php_test_files
4237
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
43-
4438
- name: Init Composer Cache # Docs: <https://git.io/JfAKn#php---composer>
4539
uses: actions/cache@v4
4640
with:
4741
path: ${{ steps.composer-cache.outputs.dir }}
4842
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
4943
restore-keys: ${{ runner.os }}-composer-
50-
5144
- name: Install Composer dependencies
5245
run: cd tests/php_test_files && composer update --prefer-dist --no-progress --ansi
53-
5446
- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
5547
uses: actions/cache@v4
5648
with:
5749
path: ~/go/pkg/mod
5850
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5951
restore-keys: ${{ runner.os }}-go-
60-
6152
- name: Install Go dependencies
6253
run: go mod download
63-
6454
- name: Create folders
6555
run: |
6656
mkdir ./tests/coverage-ci
67-
6857
- name: Install protoc
6958
uses: arduino/setup-protoc@v3
7059
with:
7160
repo-token: ${{ secrets.GITHUB_TOKEN }}
72-
7361
- name: Run golang root module tests
7462
run: |
7563
go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat ./tests/pkgs.txt) -coverprofile=./tests/coverage-ci/grpc_root.out -covermode=atomic ./codec ./parser ./protoc_plugins ./proxy
76-
7764
- name: Run ee tests with coverage
78-
run: |
79-
cd tests
80-
81-
sudo apt update
82-
sudo apt install -y libnss3-tools
83-
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
84-
chmod +x mkcert-v*-linux-amd64
85-
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
86-
mkcert -install
87-
mkcert localhost 127.0.0.1 ::1
88-
mkcert -client localhost 127.0.0.1 ::1
89-
mkdir test-certs
90-
cp -r localhost+2-client-key.pem localhost+2-client.pem localhost+2-key.pem localhost+2.pem test-certs/
91-
cp -r $(mkcert -CAROOT)/rootCA.pem test-certs/
92-
93-
docker compose -f env/docker-compose-otel.yaml up -d
94-
sleep 30
95-
go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/grpc.out -covermode=atomic grpc_plugin_gzip_test.go grpc_plugin_test.go
96-
97-
docker compose -f env/docker-compose-otel.yaml down
98-
65+
run: "cd tests\n\nsudo apt update\nsudo apt install -y libnss3-tools\ncurl -JLO \"https://dl.filippo.io/mkcert/latest?for=linux/amd64\"\nchmod +x mkcert-v*-linux-amd64\nsudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert\nmkcert -install\nmkcert localhost 127.0.0.1 ::1\nmkcert -client localhost 127.0.0.1 ::1 \nmkdir test-certs\ncp -r localhost+2-client-key.pem localhost+2-client.pem localhost+2-key.pem localhost+2.pem test-certs/\ncp -r $(mkcert -CAROOT)/rootCA.pem test-certs/\n\ndocker compose -f env/docker-compose-otel.yaml up -d\nsleep 30\ngo test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/grpc.out -covermode=atomic grpc_plugin_gzip_test.go grpc_plugin_test.go\n\ndocker compose -f env/docker-compose-otel.yaml down\n"
9966
- name: Archive code coverage results
10067
uses: actions/upload-artifact@v4
10168
with:
10269
name: coverage
10370
path: ./tests/coverage-ci
104-
105-
10671
codecov:
10772
name: Upload codecov
10873
runs-on: ubuntu-latest
10974
needs:
11075
- grpc_test
111-
11276
timeout-minutes: 60
11377
steps:
11478
- name: Download code coverage results
@@ -117,7 +81,6 @@ jobs:
11781
echo 'mode: atomic' > summary.txt
11882
tail -q -n +2 *.out >> summary.txt
11983
sed -i '2,${/roadrunner/!d}' summary.txt
120-
12184
- name: upload to codecov
12285
uses: codecov/codecov-action@v5 # Docs: <https://github.com/codecov/codecov-action>
12386
with:

api/interfaces.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package api defines public interfaces for the gRPC plugin components.
12
package api
23

34
import (

codec/codec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package codec provides a raw codec implementation for gRPC that passes through protobuf messages without re-encoding.
12
package codec
23

34
import (

0 commit comments

Comments
 (0)