From 7e5404115b5be21bc1fc6728e52ac1156539f79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 29 Nov 2021 02:29:14 -0300 Subject: [PATCH] ci: remove travis, add GH Actions. --- .github/workflows/ci.yaml | 17 +++++++++++++++++ .travis.yml | 8 -------- res/ci/format.sh | 37 +++---------------------------------- 3 files changed, 20 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..a957fcb84 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,17 @@ +name: Check PR +on: pull_request + +jobs: + only: + name: Check formatting and links + runs-on: ubuntu-18.04 + container: + image: ghcr.io/void-linux/void-linux:latest-full-x86_64-musl + steps: + - name: Prepare container + run: | + xbps-install -Syu || xbps-install -yu xbps + xbps-install -yu + xbps-install -y mdbook-linkcheck vmdfmt git + - uses: actions/checkout@v1 + - run: ./res/ci/format.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 77f0e0dab..000000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -language: bash - -script: - - res/ci/format.sh - -notifications: - email: false diff --git a/res/ci/format.sh b/res/ci/format.sh index 5aaea40e9..fb39d2fb0 100755 --- a/res/ci/format.sh +++ b/res/ci/format.sh @@ -1,43 +1,12 @@ #!/bin/sh -echo "Installing mdbook-linkcheck" - -_version="v0.7.0" -curl -sL -o ~/bin/linkcheck.tar.gz "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/${_version}/mdbook-linkcheck-${_version}-x86_64-unknown-linux-gnu.tar.gz" - -tar xvf ~/bin/linkcheck.tar.gz -C ~/bin +# Fetch upstream +git fetch git://github.com/void-linux/void-docs.git master echo "Checking links" - -RUST_LOG=linkcheck=debug ~/bin/mdbook-linkcheck -s +RUST_LOG=linkcheck=debug mdbook-linkcheck -s LINKCHECK=$? -echo "Installing Go" - -curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme -chmod +x ~/bin/gimme - -eval "$(gimme stable)" - -GO111MODULE=auto go get github.com/bobertlo/vmd/cmd/vmdfmt - -echo "Checking formatting" - -PATH=$PATH:$(go env GOPATH)/bin/ - -if ! command -v git ; then - echo "You need git to run the CI scripts" - exit 1 -fi - -if ! command -v vmdfmt ; then - echo "You need vmdfmt to run the CI scripts" - exit 1 -fi - -# Fetch upstream -git fetch git://github.com/void-linux/void-docs.git master - # Format them printf "Formatting tree" vmdfmt -l -w src/