tests: fix more yaml issues

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-02-13 02:14:10 -05:00
1 parent af014750aa
commit 7338a77285
2 files changed
+95 -95

No files matched your search

+14 -14
View File
@@ -10,17 +10,17 @@ jobs:
bump-formula: bump-formula:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Get version - name: Get version
id: get_version id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Bump Brew - name: Bump Brew
env: env:
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }} HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: | run: |
git config --global user.name 'Dokku Bot' git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com 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 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 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
+81 -81
View File
@@ -20,23 +20,23 @@ jobs:
fail-fast: true fail-fast: true
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: build package - name: build package
run: ./tests/ci/setup.sh build run: ./tests/ci/setup.sh build
- name: set matrix for build - name: set matrix for build
id: set-matrix id: set-matrix
run: | run: |
json=$(python .github/commands/matrix) json=$(python .github/commands/matrix)
echo $json echo $json
echo "::set-output name=matrix::$(echo "$json")" echo "::set-output name=matrix::$(echo "$json")"
- name: upload packages - name: upload packages
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build name: build
path: build path: build
unit-tests: unit-tests:
name: unit.${{ matrix.index }} name: unit.${{ matrix.index }}
@@ -47,30 +47,30 @@ jobs:
matrix: ${{fromJson(needs.build.outputs.matrix)}} matrix: ${{fromJson(needs.build.outputs.matrix)}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: download packages - name: download packages
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: build name: build
- name: ci-setup - name: ci-setup
run: ./.github/commands/ci-setup run: ./.github/commands/ci-setup
# - name: start ssh session # - name: start ssh session
# uses: luchihoratiu/debug-via-ssh@main # uses: luchihoratiu/debug-via-ssh@main
# with: # with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }} # SSH_PASS: ${{ secrets.SSH_PASS }}
- name: run ci - name: run ci
timeout-minutes: 30 timeout-minutes: 30
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }} run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: test-results-${{ matrix.index }} name: test-results-${{ matrix.index }}
path: test-results path: test-results
docker-deploy-tests: docker-deploy-tests:
name: docker name: docker
@@ -80,22 +80,22 @@ jobs:
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: download packages - name: download packages
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: build name: build
- name: ci-setup - name: ci-setup
run: ./.github/commands/ci-setup run: ./.github/commands/ci-setup
- name: test docker deploys - name: test docker deploys
shell: bash shell: bash
timeout-minutes: 20 timeout-minutes: 20
run: | run: |
./tests/ci/setup.sh docker ./tests/ci/setup.sh docker
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
go-tests: go-tests:
name: go.${{ matrix.index }} name: go.${{ matrix.index }}
@@ -109,33 +109,33 @@ jobs:
GITHUB_NODE_INDEX: ${{ matrix.index }} GITHUB_NODE_INDEX: ${{ matrix.index }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: download packages - name: download packages
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: build name: build
- name: ci-setup - name: ci-setup
run: ./.github/commands/ci-setup run: ./.github/commands/ci-setup
- name: run go tests - name: run go tests
run: | run: |
export CIRCLE_SHA1=$GITHUB_SHA export CIRCLE_SHA1=$GITHUB_SHA
echo "CODACY_TOKEN=$CODACY_TOKEN" echo "CODACY_TOKEN=$CODACY_TOKEN"
if [ "$CODACY_TOKEN" != "" ]; then if [ "$CODACY_TOKEN" != "" ]; then
echo "Detected value for CODACY_TOKEN" echo "Detected value for CODACY_TOKEN"
fi fi
case $GITHUB_NODE_INDEX in case $GITHUB_NODE_INDEX in
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;; 0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;; 1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
2) sudo -E make -e deploy-test-multi ;; 2) sudo -E make -e deploy-test-multi ;;
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;; 3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
esac esac
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: coverage.${{ matrix.index }} name: coverage.${{ matrix.index }}
path: test-results/coverage path: test-results/coverage
publish-test-results: publish-test-results:
name: publish-test-results name: publish-test-results
@@ -145,15 +145,15 @@ jobs:
if: success() || failure() if: success() || failure()
steps: steps:
- name: download test-results - name: download test-results
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
path: test-results path: test-results
- name: Publish Unit Test Results - name: Publish Unit Test Results
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6 uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
with: with:
check_name: Unit Test Results check_name: Unit Test Results
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml files: test-results/**/*.xml
comment_on_pr: false comment_on_pr: false