Skip to content

Commit

Permalink
Merge pull request #860 from sourcenetwork/release/0.3.1
Browse files Browse the repository at this point in the history
Release v0.3.1
  • Loading branch information
jsimnz authored Sep 23, 2022
2 parents 0e1e526 + 006e9c8 commit 40b086e
Show file tree
Hide file tree
Showing 399 changed files with 17,564 additions and 5,268 deletions.
100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/code-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Code Test Coverage
name: Code Test Coverage Workflow

on: [push]

jobs:
code-test-coverage:
name: Code test coverage job

runs-on: ubuntu-latest

steps:
Expand All @@ -15,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.17'
go-version: "1.18"
check-latest: true

- name: Generate full test coverage report using go-acc
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/detect-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Detect Change Workflow

on:
pull_request:

push:
tags:
- v*
branches:
- master
- develop

jobs:
detect-change:
name: Detect change job

runs-on: ubuntu-latest

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.18"
check-latest: true

- name: Build dependencies
run: |
make deps:modules
make deps:test
# We need SSH Authorization because change detection needs use `ls-remote` like:
# git ls-remote [email protected]:sourcenetwork/defradb.git refs/heads/develop
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Run detection for changes
run: make test:changes

## Uncomment to enable ability to SSH into the runner.
#- name: Setup upterm ssh session for debugging
# uses: lhotari/action-upterm@v1
# with:
# limit-access-to-actor: true
# limit-access-to-users: shahzadlone
12 changes: 7 additions & 5 deletions .github/workflows/lint-then-benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint and then Benchmark
name: Lint Then Benchmark Workflow

on:
pull_request:
Expand All @@ -23,7 +23,8 @@ env:
jobs:
# ========================================================= Step-1: Run the lint check.
golangci:
name: Lint Check
name: Lint check job

strategy:
matrix:
os: [ubuntu-latest]
Expand All @@ -38,7 +39,7 @@ jobs:
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.17"
go-version: "1.18"
check-latest: true

- name: Run the golangci-lint
Expand All @@ -48,7 +49,7 @@ jobs:
# Required: the version of golangci-lint is required.
# Note: The version should not pick the patch version as the latest patch
# version is what will always be used.
version: latest
version: v1.47

# Optional: working directory, useful for monorepos or if we wanted to run this
# on a non-root directory.
Expand All @@ -75,6 +76,7 @@ jobs:
# This job acts like a switch to simplify our ci control flow later on.
decide-benchmark-type:
name: Decide which benchmarks to run based on flags

strategy:
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -112,7 +114,7 @@ jobs:

# ================== Step-3: Start the runner and get it registered as a github runner.
start-runner:
name: Start self-hosted EC2 runner
name: Start self-hosted EC2 runner job

needs:
- golangci # only run if the linter check passed.
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Tests Workflow

on: [push]

jobs:
run-tests:
name: Run tests job

runs-on: ubuntu-latest

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.18"
check-latest: true

- name: Build dependencies
run: |
make deps:modules
make deps:test
- name: Build binary
run: make build

# This is to ensure tests pass with a running server.
- name: Start server from binary
run: ./build/defradb start &

- name: Run the tests, showing name of each test
run: make test:ci
50 changes: 50 additions & 0 deletions .github/workflows/start-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Start Binary Workflow

on:
pull_request:

push:
tags:
- v*
branches:
- master
- develop

jobs:
start-binary:
name: Start binary job

runs-on: ubuntu-latest

steps:

- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.18"
check-latest: true

- name: Build modules
run: make deps:modules

- name: Build binary
run: make build

- name: Attempt to start binary
run: |
./build/defradb start &
sleep 5
- name: Check if binary is still running
run: |
FOUND=$(pgrep -c "defradb");
echo "Process(es) we found = [${FOUND}]";
if [[ ${FOUND} == 0 ]]; then
echo "DefraDB start command failed.";
exit 1;
else
echo "DefraDB running.";
fi
28 changes: 28 additions & 0 deletions .github/workflows/validate-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Validate Title Workflow

on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize
branches:
- develop

jobs:
validate-title:
name: Validate title job

runs-on: ubuntu-latest

steps:

- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Ensure the scripts are not broken
run: make test:scripts

- name: Run the validation script on the title
run: ./tools/scripts/validate-conventional-style.sh "${{ github.event.pull_request.title }}"
Loading

0 comments on commit 40b086e

Please sign in to comment.