From ead46b60f06da6a5fc35cdc74d01c97b9a2a33fc Mon Sep 17 00:00:00 2001 From: MewX Date: Sat, 29 Aug 2020 02:21:14 +1000 Subject: [PATCH] Added GitHub workflow as CI --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8e3842f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master, dev ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Install Bazel + run: | + wget https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel_3.4.1-linux-x86_64.deb + wget https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel_3.4.1-linux-x86_64.deb.sha256 + sha256sum -c bazel_3.4.1-linux-x86_64.deb.sha256 + sudo dpkg -i bazel_3.4.1-linux-x86_64.deb + + - name: Build + run: + bazel build :doubak + + - name: Test + run: + bazel test //... diff --git a/README.md b/README.md index be9e470..4431492 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Doubak + +[![GitHub Action CI](https://github.com/its-my-data/doubak/workflows/CI/badge.svg?branch=master)](https://github.com/its-my-data/doubak/actions?query=workflow%3ACI) + 豆瓣 (Douban.com) 备份工具命令行版,备份完整页面镜像,Golang实现。 ## 为什么会有此项目?