mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Compare commits
4 Commits
2.2.3-test
...
2.2.3-test
Author | SHA1 | Date | |
---|---|---|---|
a3136ebb13 | |||
4a4d0dad4b | |||
3b87511f48 | |||
f5fba04097 |
@ -1,16 +1,38 @@
|
|||||||
name: 'Mayhem for API'
|
name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [ master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
steps:
|
||||||
fail-fast: true
|
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.18
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: go get
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
run: go test ./... -run ./...
|
||||||
|
|
||||||
|
- name: API Tests
|
||||||
|
run: |
|
||||||
|
npm -g install newman
|
||||||
|
./testing/run_api_tests.sh
|
||||||
|
|
||||||
|
mapi:
|
||||||
|
name: 'Mayhem for API'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.x
|
- name: Set up Go 1.x
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
@ -50,3 +72,26 @@ jobs:
|
|||||||
uses: github/codeql-action/upload-sarif@v1
|
uses: github/codeql-action/upload-sarif@v1
|
||||||
with:
|
with:
|
||||||
sarif_file: mapi.sarif
|
sarif_file: mapi.sarif
|
||||||
|
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.18
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: go get
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build -v .
|
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
@ -1,20 +1,24 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
pull_request:
|
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
release:
|
||||||
name: Build & Release
|
name: Release
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
include:
|
||||||
|
- platform: ubuntu-latest
|
||||||
|
alias: linux
|
||||||
|
- platform: macos-latest
|
||||||
|
alias: mac
|
||||||
|
- platform: windows-latest
|
||||||
|
alias: win
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@ -29,20 +33,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: go get
|
||||||
go get
|
|
||||||
|
|
||||||
- name: Enable Go 1.11 modules
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: cmd /c "set GO111MODULE=on"
|
|
||||||
|
|
||||||
- name: Unit Tests
|
|
||||||
run: go test ./... -run ./...
|
|
||||||
|
|
||||||
- name: API Tests
|
|
||||||
run: |
|
|
||||||
npm -g install newman
|
|
||||||
./testing/run_api_tests.sh
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v .
|
run: go build -v .
|
||||||
@ -51,20 +42,14 @@ jobs:
|
|||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
cp .\config.default.yml .\config.yml
|
cp .\config.default.yml .\config.yml
|
||||||
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath release.zip
|
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.alias }}_amd64.zip
|
||||||
- name: Compress working folder on Unix
|
- name: Compress working folder on Unix
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
cp config.default.yml config.yml
|
cp config.default.yml config.yml
|
||||||
zip -9 release.zip wakapi config.yml
|
zip -9 wakapi_${{ matrix.alias }}_amd64.zip wakapi config.yml
|
||||||
|
|
||||||
- name: Upload built executable to Release
|
- name: Upload built executable to Release
|
||||||
if: github.event_name == 'release'
|
uses: softprops/action-gh-release@v1
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
files: wakapi_${{ matrix.alias }}_amd64.zip
|
||||||
asset_path: release.zip
|
|
||||||
asset_name: wakapi_${{ runner.os }}_amd64.zip
|
|
||||||
asset_content_type: application/gzip
|
|
||||||
|
Reference in New Issue
Block a user