ci: fix yamllint warnings/errors

pull/10866/head
Delyan Angelov 2021-07-19 13:26:36 +03:00
parent b10be83c7e
commit dbba46b349
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
3 changed files with 43 additions and 38 deletions

View File

@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build V - name: Build V
run: make run: make
- name: Check markdown line length & code examples - name: Check markdown line length & code examples
run: ./v check-md -hide-warnings . run: ./v check-md -hide-warnings .
## NB: -hide-warnings is used here, so that the output is less noisy, ## NB: -hide-warnings is used here, so that the output is less noisy,
## thus real errors are easier to spot. ## thus real errors are easier to spot.

View File

@ -10,35 +10,39 @@ on:
jobs: jobs:
build-vc: build-vc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
VREPO: github.com/vlang/vc.git
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build V - name: Build V
run: make run: make
- name: Regenerate v.c and v_win.c - name: Regenerate v.c and v_win.c
run: | run: |
git config --global user.email "vlang-bot@users.noreply.github.com" git config --global user.email "vlang-bot@users.noreply.github.com"
git config --global user.name "vlang-bot" git config --global user.name "vlang-bot"
COMMIT_HASH=$(git rev-parse --short HEAD) COMMIT_HASH=$(git rev-parse --short HEAD)
COMMIT_MSG=$(git log -1 --oneline --pretty='%s' HEAD) COMMIT_MSG=$(git log -1 --oneline --pretty='%s' HEAD)
rm -rf vc rm -rf vc
git clone --depth=1 https://vlang-bot:${{ secrets.VLANG_BOT_SECRET }}@github.com/vlang/vc.git git clone --depth=1 \
https://vlang-bot:${{ secrets.VLANG_BOT_SECRET }}@$VREPO
rm -rf vc/v.c vc/v_win.c rm -rf vc/v.c vc/v_win.c
./v -o vc/v.c -os cross cmd/v ./v -o vc/v.c -os cross cmd/v
./v -o vc/v_win.c -os windows cmd/v ./v -o vc/v_win.c -os windows cmd/v
sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v.c sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v.c
sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v_win.c sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v_win.c
# ensure the C files are over 5000 lines long, as a safety measure # ensure the C files are over 5000 lines long, as a safety measure
[ $(wc -l < vc/v.c) -gt 5000 ] [ $(wc -l < vc/v.c) -gt 5000 ]
[ $(wc -l < vc/v_win.c) -gt 5000 ] [ $(wc -l < vc/v_win.c) -gt 5000 ]
git -C vc add v.c v_win.c git -C vc add v.c v_win.c
git -C vc commit -m "[v:master] $COMMIT_HASH - $COMMIT_MSG" git -C vc commit -m "[v:master] $COMMIT_HASH - $COMMIT_MSG"
git -C vc pull --rebase origin master # in case there are recent commits # in case there are recent commits:
git -C vc push git -C vc pull --rebase origin master
git -C vc push

View File

@ -10,11 +10,12 @@ jobs:
build-module-docs: build-module-docs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build V - name: Build V
run: make run: make
- name: Build module documentation - name: Build module documentation
run: ./v doc -m -f html vlib/ run: ./v doc -m -f html vlib/
- name: Deploy docs to vercel - name: Deploy docs to vercel
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
run: npx vercel --confirm --prod --name vmodules --token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true run: npx vercel --confirm --prod --name vmodules \
--token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true