Skip to content

Commit

Permalink
Merge pull request #2396 from sourcenetwork/release/0.10.0
Browse files Browse the repository at this point in the history
Release v0.10.0
  • Loading branch information
fredcarle authored Mar 9, 2024
2 parents 316c8d7 + cbe7dc5 commit 051895a
Show file tree
Hide file tree
Showing 396 changed files with 19,863 additions and 10,375 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ updates:
labels:
- "dependencies"
commit-message:
prefix: "bot"
prefix: "bot"
2 changes: 1 addition & 1 deletion .github/workflows/build-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true

- name: Build all dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-then-deploy-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Terraform validation
run: terraform validate -no-color

- name: List workspaces
- name: List workspaces
run: ls workspaces

- name: Terraform Apply
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-vulnerabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Run govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: "1.20"
go-version-input: "1.21"
go-package: ./...
check-latest: true
cache: true
35 changes: 19 additions & 16 deletions .github/workflows/combine-bot-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ on:
default: 'dependabot'

mustBeGreen:
description: 'Only combine PRs that are green (status is success). Set to false if repo does not run checks'
description: 'Only combine PRs that are green (status is success). Keep false if repo does not run checks'
type: boolean
required: true
default: true
default: false

combineBranchName:
description: 'Name of the branch to combine PRs into'
Expand All @@ -35,7 +35,7 @@ on:
ignoreLabel:
description: 'Exclude PRs with this label'
required: true
default: 'nocombine'
default: 'DO NOT MERGE'

jobs:
combine-bot-prs:
Expand All @@ -44,12 +44,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/github-script@v6
- name: Set current date as env variable
run: echo "CURRENT_DATE=$(date +'%d-%m-%Y')" >> ${GITHUB_ENV}

- name: Create combined pr
id: create-combined-pr

name: Create combined pr

uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -66,7 +66,7 @@ jobs:
if (branch.startsWith('${{ github.event.inputs.branchPrefix }}')) {
console.log('Branch matched prefix: ' + branch);
let statusOK = true;
if(${{ github.event.inputs.mustBeGreen }}) {
if (${{ github.event.inputs.mustBeGreen }}) {
console.log('Checking green status: ' + branch);
const stateQuery = `query($owner: String!, $repo: String!, $pull_number: Int!) {
repository(owner: $owner, name: $repo) {
Expand All @@ -92,25 +92,28 @@ jobs:
const [{ commit }] = result.repository.pullRequest.commits.nodes;
const state = commit.statusCheckRollup.state
console.log('Validating status: ' + state);
if(state != 'SUCCESS') {
if (state != 'SUCCESS') {
console.log('Discarding ' + branch + ' with status ' + state);
statusOK = false;
}
}
console.log('Checking labels: ' + branch);
const labels = pull['labels'];
for(const label of labels) {
for (const label of labels) {
const labelName = label['name'];
console.log('Checking label: ' + labelName);
if(labelName == '${{ github.event.inputs.ignoreLabel }}') {
if (labelName == '${{ github.event.inputs.ignoreLabel }}') {
console.log('Discarding ' + branch + ' with label ' + labelName);
statusOK = false;
}
}
if (statusOK) {
console.log('Adding branch to array: ' + branch);
const prString = '#' + pull['number'] + ' ' + pull['title'];
branchesAndPRStrings.push({ branch, prString });
branchesAndPRStrings.push({
branch,
prString
});
baseBranch = pull['base']['ref'];
baseBranchSHA = pull['base']['sha'];
}
Expand All @@ -135,7 +138,7 @@ jobs:
let combinedPRs = [];
let mergeFailedPRs = [];
for(const { branch, prString } of branchesAndPRStrings) {
for (const { branch, prString } of branchesAndPRStrings) {
try {
await github.rest.repos.merge({
owner: context.repo.owner,
Expand All @@ -153,15 +156,15 @@ jobs:
console.log('Creating combined PR');
const combinedPRsString = combinedPRs.join('\n');
let body = '✅ This PR was created by the Combine PRs action by combining the following PRs:\n' + combinedPRsString;
if(mergeFailedPRs.length > 0) {
let body = '✅ This PR was created by combining the following PRs:\n' + combinedPRsString;
if (mergeFailedPRs.length > 0) {
const mergeFailedPRsString = mergeFailedPRs.join('\n');
body += '\n\n⚠️ The following PRs were left out due to merge conflicts:\n' + mergeFailedPRsString
}
await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'bot: Combined PRs',
title: 'bot: Update dependencies (bulk dependabot PRs) ${CURRENT_DATE}',
head: '${{ github.event.inputs.combineBranchName }}',
base: baseBranch,
body: body
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint-then-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true

- name: Run the golangci-lint
Expand Down Expand Up @@ -270,7 +270,8 @@ jobs:
github.event_name == 'pull_request' &&
github.base_ref == 'develop'
run: >
${GOPATH}/bin/benchstat -html -alpha 1.1 develop.txt current.txt | sed -n "/<body>/,/<\/body>/p" > comparison.html &&
${GOPATH}/bin/benchstat -html -alpha 1.1 develop.txt current.txt |
sed -n "/<body>/,/<\/body>/p" > comparison.html &&
./tools/scripts/pretty-benchstat-html.sh comparison.html > pretty-comparison.md
- name: Comment Benchmark Results on PR
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ permissions:
contents: read

jobs:
lint:
name: Lint job
lint-go:
name: Lint GoLang job

runs-on: ubuntu-latest

Expand All @@ -36,12 +36,11 @@ jobs:
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true

- name: Check linting through golangci-lint
- name: Run golangci-lint linter
uses: golangci/golangci-lint-action@v3

with:
# Required: the version of golangci-lint is required.
# Note: The version should not pick the patch version as the latest patch
Expand All @@ -68,3 +67,18 @@ jobs:
# anyways so there shouldn't be any linter errors anyways. The enforces us to
# always have a clean lint state.
only-new-issues: false

lint-yaml:
name: Lint YAML job

runs-on: ubuntu-latest

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

- name: Run yamllint linter
uses: ibiqlik/action-yamllint@v3
with:
config_file: tools/configs/yamllint.yaml
file_or_dir: .
2 changes: 1 addition & 1 deletion .github/workflows/preview-ami-with-terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ jobs:
if: steps.terraform-plan.outcome == 'failure'
run: exit 1

- name: List workspaces
- name: List workspaces
run: ls workspaces
Loading

0 comments on commit 051895a

Please sign in to comment.