From a9c0d6ed172ff86c5e41297eac9969fa4b3e72b0 Mon Sep 17 00:00:00 2001 From: AaronLiu Date: Sat, 20 Mar 2021 22:41:28 -0800 Subject: [PATCH] Update and rename build.yml to test.yml --- .github/workflows/build.yml | 88 ------------------------------------- .github/workflows/test.yml | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 88 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1ebcb47..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Build - -on: - push: - branches: [ master ] - -jobs: - - test: - name: Test - runs-on: ubuntu-16.04 - steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: Get dependencies - run: | - go get github.com/rakyll/statik - export PATH=$PATH:~/go/bin/ - statik -src=models -f - - - name: Test - run: go test -coverprofile=coverage.txt -covermode=atomic ./... - - build: - name: Build - needs: test - runs-on: ubuntu-16.04 - steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - with: - clean: false - submodules: 'recursive' - - run: | - git fetch --prune --unshallow --tags - - - name: Get dependencies and build - run: | - go get github.com/rakyll/statik - export PATH=$PATH:~/go/bin/ - statik -src=models -f - sudo apt-get update - sudo apt-get -y install gcc-mingw-w64-x86-64 - sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross - sudo apt-get -y install gcc-aarch64-linux-gnu libc6-dev-arm64-cross - chmod +x ./build.sh - ./build.sh -r b - - - name: Upload binary files (windows_amd64) - uses: actions/upload-artifact@v2 - with: - name: cloudreve_windows_amd64 - path: release/cloudreve*windows_amd64.* - - - name: Upload binary files (linux_amd64) - uses: actions/upload-artifact@v2 - with: - name: cloudreve_linux_amd64 - path: release/cloudreve*linux_amd64.* - - - name: Upload binary files (linux_arm) - uses: actions/upload-artifact@v2 - with: - name: cloudreve_linux_arm - path: release/cloudreve*linux_arm.* - - - name: Upload binary files (linux_arm64) - uses: actions/upload-artifact@v2 - with: - name: cloudreve_linux_arm64 - path: release/cloudreve*linux_arm64.* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..26e0d22 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: [ master ] + +jobs: + + test: + name: Test + runs-on: ubuntu-16.04 + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Get dependencies + run: | + go get github.com/rakyll/statik + export PATH=$PATH:~/go/bin/ + statik -src=models -f + + - name: Test + run: go test -coverprofile=coverage.txt -covermode=atomic ./... + + - name: Upload binary files (linux_arm) + uses: actions/upload-artifact@v2 + with: + name: cloudreve_linux_arm + path: release/cloudreve*linux_arm.* + + - name: Upload binary files (linux_arm64) + uses: actions/upload-artifact@v2 + with: + name: cloudreve_linux_arm64 + path: release/cloudreve*linux_arm64.*