mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
fix(ci): actions workflows
This commit is contained in:
parent
d3e1e516c8
commit
c30dd16cbe
10
.github/workflows/common.yml
vendored
10
.github/workflows/common.yml
vendored
@ -1,10 +0,0 @@
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with: { go-version: 1.17 }
|
||||
- uses: actions/setup-node@v3
|
||||
with: { node-version: '14' }
|
||||
- name: Install task binary
|
||||
run: go get github.com/go-task/task/v3/cmd/task
|
8
.github/workflows/install-go.yml
vendored
Normal file
8
.github/workflows/install-go.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
install_go:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with: { go-version: 1.17 }
|
8
.github/workflows/install-node.yml
vendored
Normal file
8
.github/workflows/install-node.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
install_node:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with: { node-version: '14' }
|
7
.github/workflows/install-task-binary.yml
vendored
Normal file
7
.github/workflows/install-task-binary.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
install_task_binary:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- run: go get github.com/go-task/task/v3/cmd/task
|
42
.github/workflows/main.yml
vendored
42
.github/workflows/main.yml
vendored
@ -7,7 +7,10 @@ jobs:
|
||||
build-local:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: ./.github/workflows/common.yml
|
||||
- uses: ./.github/workflows/install-go.yml
|
||||
- uses: ./.github/workflows/install-node.yml
|
||||
- uses: ./.github/workflows/install-task-binary.yml
|
||||
- uses: actions/checkout@v3
|
||||
- run: task deps
|
||||
- run: task compile
|
||||
- uses: ./.github/workflows/test-compile-changes.yml
|
||||
@ -16,14 +19,49 @@ jobs:
|
||||
build:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: ./.github/workflows/common.yml
|
||||
- uses: ./.github/workflows/install-go.yml
|
||||
- uses: ./.github/workflows/install-node.yml
|
||||
- uses: ./.github/workflows/install-task-binary.yml
|
||||
- run: sudo apt update && sudo apt-get install rpm
|
||||
- uses: actions/checkout@v3
|
||||
- run: task deps
|
||||
- run: task compile
|
||||
- uses: ./.github/workflows/test-compile-changes.yml
|
||||
- uses: ./.github/workflows/unlock-gpg.yml
|
||||
- run: task build
|
||||
|
||||
test-golang:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: ./.github/workflows/install-go.yml
|
||||
- uses: ./.github/workflows/install-task-binary.yml
|
||||
- run: go get github.com/schrej/godacov
|
||||
- uses: actions/checkout@v3
|
||||
- run: task deps:tools
|
||||
- run: task deps:be
|
||||
- run: task compile:be
|
||||
- run: task lint:be
|
||||
- run: task test
|
||||
- run: godacov -t "${CODACY_TOKEN}" -r ./coverage.out -c "${CIRCLE_SHA1}" || true
|
||||
|
||||
test-integration:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/workflows/install-task-binary.yml
|
||||
- run: context=ci task dc:up
|
||||
|
||||
test-db-migration:
|
||||
steps:
|
||||
- uses: ./.github/workflows/install-node.yml
|
||||
- uses: ./.github/workflows/install-task-binary.yml
|
||||
# TODO: add semaphore binary from previous job
|
||||
- run: "cat > config.json <<EOF\n{\n\t\"mysql\": {\n\t\t\"host\": \"127.0.0.1:3306\"\
|
||||
,\n\t\t\"user\": \"root\",\n\t\t\"pass\": \"\",\n\t\t\"name\": \"circle_test\"\
|
||||
\n\t},\n\t\"email_alert\": false\n}\nEOF\n"
|
||||
- run: dockerize -wait tcp://127.0.0.1:3306 -timeout 1m
|
||||
- run: bin/semaphore migrate --config config.json
|
||||
|
||||
release:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
|
3
.github/workflows/unlock-gpg.yml
vendored
3
.github/workflows/unlock-gpg.yml
vendored
@ -7,8 +7,7 @@ jobs:
|
||||
unlock_gpg:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Unlock
|
||||
run: |
|
||||
- run: |
|
||||
echo ${{ ${{ secrets.gpg_key }} }} | tr " " "\n" | base64 -d | gpg --import --batch
|
||||
gpg --sign -u "8CDE D132 5E96 F1D9 EABF 17D4 2C96 CF7D D27F AB82" --pinentry-mode loopback --yes --batch --passphrase "${{ secrets.gpg_pass }}" --output unlock.sig --detach-sign README.md
|
||||
rm -f unlock.sig
|
||||
|
Loading…
Reference in New Issue
Block a user