Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

37 changes: 3 additions & 34 deletions res/ci/format.sh
Original file line number Diff line number Diff line change
@@ -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/
Expand Down