-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update station application to use go-redis/resis/v8 (#108)
This PR updates the application to go-redis/redis/v8 and the applies the proper changes to the way we use the API. This should be compatible with the redis default server used in typical station installs. In support of this change the Docker build process no longer needs to checkout a custom version of the go-redis/redis repo and now. This lead to some modification to the docker workflow that fixes a bug when building using local modifications to source code. Also this PR revamps the CI/CD pipeline to validate tests, linting, and formatting for both rust and golang code.
- Loading branch information
Showing
23 changed files
with
2,270 additions
and
1,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,52 @@ on: | |
jobs: | ||
|
||
build: | ||
name: Build and Test using Golang ${{ matrix.go-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [1.15.x, 1.16.x, 1.17.x] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: go/src/github.com/refraction-networking/conjure | ||
|
||
|
||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler software-properties-common -y -q | ||
sudo apt-get install libzmq3-dev libssl-dev pkg-config libgmp3-dev -y -q | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15.4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Build app | ||
run: go build -v ./application | ||
- name: Test | ||
run: | | ||
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure | ||
export GOPATH="$GITHUB_WORKSPACE/go" | ||
go test -v ./... | ||
- name: Build registration-api | ||
run: go build -v ./registration-api | ||
- name: Build app | ||
run: | | ||
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure | ||
make app | ||
- name: Test | ||
run: go test -v ./... | ||
- name: Build registration-api | ||
run: | | ||
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure | ||
make registration-api | ||
golangci-lint: | ||
name: Format and Lint with golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: rust | ||
|
||
on: | ||
push: | ||
branches: [ master] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
test: | ||
name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# ubuntu-latest is another name for ubuntu-20.04 | ||
# - { rust: stable, os: ubuntu-latest } | ||
- { rust: stable, os: ubuntu-18.04 } | ||
- { rust: stable, os: ubuntu-20.04 } | ||
- { rust: nightly, os: ubuntu-latest } | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler software-properties-common -y -q | ||
sudo apt-get install libzmq3-dev libssl-dev pkg-config libgmp3-dev -y -q | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
|
||
- run: cargo test --verbose --workspace | ||
# - run: cargo test --verbose --workspace --all-features | ||
# - run: cargo test --verbose --workspace --no-default-features | ||
|
||
clippy: | ||
name: Lint with clippy | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: -Dwarnings | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler software-properties-common -y -q | ||
sudo apt-get install libzmq3-dev libssl-dev pkg-config libgmp3-dev -y -q | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
components: clippy | ||
- run: cargo clippy --workspace --all-targets --verbose | ||
# - run: cargo clippy --workspace --all-targets --verbose --no-default-features | ||
# - run: cargo clippy --workspace --all-targets --verbose --all-features | ||
|
||
rustfmt: | ||
name: Verify code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
components: rustfmt | ||
- run: cargo fmt --all -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
all: | ||
/usr/local/go/bin/go build -race -a . | ||
go build -race -a . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.