Skip to content

Commit

Permalink
Merge pull request #103 from spiral/pkg.go.dev_wrong_version
Browse files Browse the repository at this point in the history
stabilization(various): stabilization PR
  • Loading branch information
rustatian authored Feb 6, 2021
2 parents d99f4b7 + 8cdca84 commit ccad63d
Show file tree
Hide file tree
Showing 20 changed files with 223 additions and 125 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: gomod # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: daily

24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Reason for This PR

`[Author TODO: add issue # or explain reasoning.]`

## Description of Changes

`[Author TODO: add description of changes.]`

## License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

## PR Checklist

`[Author TODO: Meet these criteria.]`
`[Reviewer TODO: Verify that these criteria are met. Request changes if not]`

- [ ] All commits in this PR are signed (`git commit -s`) or (`git commit -S`).
- [ ] The reason for this PR is clearly provided (issue no. or explanation).
- [ ] The description of changes is clear and encompassing.
- [ ] Any required documentation changes (code and docs) are included in this PR.
- [ ] Any user-facing changes are mentioned in `CHANGELOG.md`.
- [ ] All added/changed functionality is tested.
25 changes: 25 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Linters

on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
- '**:**'

jobs:
golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Run linter
uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.35 # without patch version
only-new-issues: false # show only new issues if it's a pull request
35 changes: 5 additions & 30 deletions .github/workflows/ci-build.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Linux

on:
push:
Expand All @@ -12,14 +12,14 @@ on:

jobs:
build:
name: Build (Go ${{ matrix.go }} OS ${{ matrix.os }})
name: Tests [Go ${{ matrix.go }} OS ${{ matrix.os }}]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
fail-fast: true
matrix:
go: [ 1.14, 1.15 ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-20.04]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
Expand All @@ -39,18 +39,7 @@ jobs:
- name: Install Go dependencies
run: go mod download


- name: Run golang tests on Windows without codecov
if: ${{ matrix.os == 'windows-latest' }}
run: |
go test -v -race -tags=debug ./pkg/frame
go test -v -race -tags=debug ./pkg/pipe
go test -v -race -tags=debug ./pkg/rpc
go test -v -race -tags=debug ./pkg/socket
- name: Run golang tests on MacOS or Linux with codecov
if: ${{ matrix.os != 'windows-latest' }}
- name: Run golang tests on Linux with codecov
run: |
mkdir ./coverage-ci
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/frame.txt -covermode=atomic ./pkg/frame
Expand All @@ -60,21 +49,7 @@ jobs:
cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
if: ${{ matrix.os != 'windows-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage-ci/summary.txt
fail_ci_if_error: false

golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Run linter
uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.35 # without patch version
only-new-issues: false # show only new issues if it's a pull request
49 changes: 49 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: MacOS

on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
- '**:**'

jobs:
build:
name: Tests [Go ${{ matrix.go }} OS ${{ matrix.os }}]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
go: [ 1.14, 1.15 ]
os: [ macos-latest ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Check out code
uses: actions/checkout@v2

- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Install Go dependencies
run: go mod download

- name: Run golang tests on MacOS
run: |
mkdir ./coverage-ci
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/frame.txt -covermode=atomic ./pkg/frame
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pipe.txt -covermode=atomic ./pkg/pipe
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/rpc.txt -covermode=atomic ./pkg/rpc
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/socket.txt -covermode=atomic ./pkg/socket
cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt
48 changes: 48 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Windows

on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
- '**:**'

jobs:
build:
name: Tests [Go ${{ matrix.go }} OS ${{ matrix.os }}]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
go: [ 1.14, 1.15 ]
os: [ windows-latest ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Check out code
uses: actions/checkout@v2

- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Install Go dependencies
run: go mod download


- name: Run golang tests on Windows
run: |
go test -v -race -tags=debug ./pkg/frame
go test -v -race -tags=debug ./pkg/pipe
go test -v -race -tags=debug ./pkg/rpc
go test -v -race -tags=debug ./pkg/socket
47 changes: 39 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,85 +1,113 @@
CHANGELOG
=========

### v3.0.1 (06.02.2021)

- Move relay interface to the pkg folder.
- Separate CI into Linux, MacOS, Windows and Linters.
- Correct README.md (Installation and sample)
- Add PR template.
- Add dependabot.

### v3.0.0 (18.01.2021)

- New protocol (pkg/frame/frame.md)
- Various payloads support: msgpack, raw bytes, JSON, gob.
- New repo architecture.
- Shared memory [alfa].

### v2.4.6 (21.10.2020)

- Remove RawMessage check for the payload (@wolfy-j)
- golang version in go.mod bumped to 1.15

## v2.4.2 (19.05.2020)

- Add phpstan analyzer
- Fix code warnings from phpstan
- Improve Relay factory and SocketRelay
- Improve Relay factory and SocketRelay
- Improve test coverage
- Performance improvements
- See the full milestone here: [link](https://github.com/spiral/goridge/milestone/5?closed=1)

## v2.4.0 (05.05.2020)

- More tests for PHP (@vvval)
- Upgrade PHP version to the 7.2 (currently minimum supported)
- Add new RelayInterface [link](https://github.com/spiral/goridge/pull/56/files#diff-85a3f483116946b4093f21ad855af4a8) (@vvval)
- Add new RelayInterface [link](https://github.com/spiral/goridge/pull/56/files#diff-85a3f483116946b4093f21ad855af4a8) (
@vvval)
- See the full milestone here: [link](https://github.com/spiral/goridge/issues?q=is%3Aclosed+milestone%3A2.4.0)

## v2.3.1 (21.04.2020)
- Syscall usage optimized. Now the data is packing and sending via 1 (or 2 in some cases) send_socket calls, instead of 2-3 (by @vvval)

- Syscall usage optimized. Now the data is packing and sending via 1 (or 2 in some cases) send_socket calls, instead of
2-3 (by @vvval)
- Unix sockets supported on windows (AF_UNIX) starting from OS Build 17056.
- Add the ability to define own relay with a codec (by @Reasno)

## v2.3.0 (23.03.2020)
- Replace std encoding/json package with the https://github.com/json-iterator/go

- Replace std encoding/json package with the https://github.com/json-iterator/go
- Add BORS and GHA support
- golang modules updated to v2

## v2.2.1 (30.11.2019)
- Fixed too strict StreamRelay check by @tarampampam

- Fixed too strict StreamRelay check by @tarampampam

## v2.2.0 (29.11.2019)

- Update travis to support go 1.13
- Update tests (errors handling, simplify)
- Add go modules support
- Optimize pack function

by @ValeryPiashchynski
by @ValeryPiashchynski

## v2.1.4 (01.04.2019)

- minor performance improvements by @zloyuser
- removed nighly from travis

## v2.1.3 (30.09.2018)

- improved performance (reduced number of syscalls required for Send command)

## v2.1.2 (07.06.2018)

- added 8 more bytes to the payload
- added error detection mechanism over binary masks
- added panic handler for pipe relay

## v2.1.0 (03.06.2018)

- added golang ClientCodec implementation
- additional error detections
- added sequence support
- more tests

## v2.0.5 (03.04.2018)

- handled possible panic on reading from broken connection in socket relay

## v2.0.4 (23.03.2018)

- minor performance improvement in memory allocation for buffer by @243083df

## v2.0.3 (20.02.2018)

- fixed unix socket support on MacOS by @bgetsug

## v2.0.2 (29.01.2018)

- typo in SOCK_TPC constant

## v2.0.1 (23.01.2018)

- support sending empty string payloads without PAYLOAD_NONE flag

## v2.0.0 (17.11.2017)

- ext-sockets is not required anymore
- Connection renamed to Relay
- JsonRPC renamed to RPC
Expand All @@ -88,7 +116,7 @@ by @ValeryPiashchynski
- Added ability to invoke PHP from Go
- Added control headers to manage execution flow
- CLOSE_CONNECTION and KEEP_CONNECTION constants are removed
- \*\_BODY constants renamed to PAYLOAD\_\* to comply with .go code
- \*\_BODY constants renamed to PAYLOAD\_\* to comply with .go code
- Protocol is extracted from Codec as independent abstraction
- Simplified RPC Codec implementation
- Code is formatted to comply to Golint
Expand All @@ -97,11 +125,14 @@ by @ValeryPiashchynski
- More error checks in PHP code
- License holder moved from Spiral Framework to SpiralScout

## v1.0.4
## v1.0.4

- library dependency downgraded to support PHP7.0 by @thePanz

## v1.0.1 (14.08.2017)

- service level exception for invalid json payloads

## v1.0.0 (14.08.2017)

- public Goridge release
Loading

0 comments on commit ccad63d

Please sign in to comment.