这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.1

jobs:
Expand Down
9 changes: 5 additions & 4 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
exclude_paths:
- vendor/**/*
- tests/**/*
- "**_test.go"
- contrib/*
- vendor/**/*
- tests/**/*
- "**_test.go"
- contrib/*
10 changes: 10 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
default: true

# Line length
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013
MD013: false

# Inline HTML
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033
MD033: false
5 changes: 5 additions & 0 deletions .github/linters/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
extends: default

rules:
line-length: disable
35 changes: 19 additions & 16 deletions .github/workflows/bump-formula.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
---
name: bump-formula

# yamllint disable-line rule:truthy
on:
push:
tags:
- '*'
tags:
- '*'
jobs:
bump-formula:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Bump Brew
env:
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: |
git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
brew bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ steps.get_version.outputs.version }}.tar.gz" dokku/repo/dokku
- name: Checkout repository
uses: actions/checkout@v2
- name: Get version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Bump Brew
env:
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: |
git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
brew bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ steps.get_version.outputs.version }}.tar.gz" dokku/repo/dokku
172 changes: 87 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
Expand All @@ -18,23 +20,23 @@ jobs:
fail-fast: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: build package
run: ./tests/ci/setup.sh build
- name: build package
run: ./tests/ci/setup.sh build

- name: set matrix for build
id: set-matrix
run: |
json=$(python .github/commands/matrix)
echo $json
echo "::set-output name=matrix::$(echo "$json")"
- name: set matrix for build
id: set-matrix
run: |
json=$(python .github/commands/matrix)
echo $json
echo "::set-output name=matrix::$(echo "$json")"

- name: upload packages
uses: actions/upload-artifact@v2
with:
name: build
path: build
- name: upload packages
uses: actions/upload-artifact@v2
with:
name: build
path: build

unit-tests:
name: unit.${{ matrix.index }}
Expand All @@ -45,30 +47,30 @@ jobs:
matrix: ${{fromJson(needs.build.outputs.matrix)}}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: download packages
uses: actions/download-artifact@v1
with:
name: build
- name: download packages
uses: actions/download-artifact@v1
with:
name: build

- name: ci-setup
run: ./.github/commands/ci-setup
- name: ci-setup
run: ./.github/commands/ci-setup

# - name: start ssh session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
# - name: start ssh session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}

- name: run ci
timeout-minutes: 30
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
- name: run ci
timeout-minutes: 30
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}

- uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.index }}
path: test-results
- uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.index }}
path: test-results

docker-deploy-tests:
name: docker
Expand All @@ -78,22 +80,22 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: download packages
uses: actions/download-artifact@v1
with:
name: build
- name: download packages
uses: actions/download-artifact@v1
with:
name: build

- name: ci-setup
run: ./.github/commands/ci-setup
- name: ci-setup
run: ./.github/commands/ci-setup

- name: test docker deploys
shell: bash
timeout-minutes: 20
run: |
./tests/ci/setup.sh docker
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
- name: test docker deploys
shell: bash
timeout-minutes: 20
run: |
./tests/ci/setup.sh docker
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker

go-tests:
name: go.${{ matrix.index }}
Expand All @@ -107,33 +109,33 @@ jobs:
GITHUB_NODE_INDEX: ${{ matrix.index }}

steps:
- uses: actions/checkout@v2

- name: download packages
uses: actions/download-artifact@v1
with:
name: build

- name: ci-setup
run: ./.github/commands/ci-setup

- name: run go tests
run: |
export CIRCLE_SHA1=$GITHUB_SHA
echo "CODACY_TOKEN=$CODACY_TOKEN"
if [ "$CODACY_TOKEN" != "" ]; then
echo "Detected value for CODACY_TOKEN"
fi
case $GITHUB_NODE_INDEX in
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
2) sudo -E make -e deploy-test-multi ;;
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
esac
- uses: actions/upload-artifact@v2
with:
name: coverage.${{ matrix.index }}
path: test-results/coverage
- uses: actions/checkout@v2

- name: download packages
uses: actions/download-artifact@v1
with:
name: build

- name: ci-setup
run: ./.github/commands/ci-setup

- name: run go tests
run: |
export CIRCLE_SHA1=$GITHUB_SHA
echo "CODACY_TOKEN=$CODACY_TOKEN"
if [ "$CODACY_TOKEN" != "" ]; then
echo "Detected value for CODACY_TOKEN"
fi
case $GITHUB_NODE_INDEX in
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
2) sudo -E make -e deploy-test-multi ;;
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
esac
- uses: actions/upload-artifact@v2
with:
name: coverage.${{ matrix.index }}
path: test-results/coverage

publish-test-results:
name: publish-test-results
Expand All @@ -143,15 +145,15 @@ jobs:
if: success() || failure()

steps:
- name: download test-results
uses: actions/download-artifact@v2
with:
path: test-results

- name: Publish Unit Test Results
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
with:
check_name: Unit Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml
comment_on_pr: false
- name: download test-results
uses: actions/download-artifact@v2
with:
path: test-results

- name: Publish Unit Test Results
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
with:
check_name: Unit Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml
comment_on_pr: false
58 changes: 30 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
Expand All @@ -12,12 +13,13 @@

name: "CodeQL"

# yamllint disable-line rule:truthy
on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '18 22 * * 2'

Expand All @@ -29,40 +31,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ['go']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
# - run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
Loading