Skip to content

Commit

Permalink
chore: workflow improvements (quicksilver-zone#334)
Browse files Browse the repository at this point in the history
* refactor workflows

* create md link workflow

* basic config for md link checker

* clean up names

* remove push

* include mac and m1

---------

Co-authored-by: Ajaz Ahmed Ansari <[email protected]>
Co-authored-by: Joe Bowman <[email protected]>
  • Loading branch information
3 people authored Mar 24, 2023
1 parent 98004f6 commit b7428ac
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 11 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# This is a basic workflow that is manually triggered

name: compile quicksilver
name: build and test

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on: [push, pull_request, workflow_dispatch]
on: [pull_request, workflow_dispatch]

# This workflow makes x86_64 for windows, and linux.

jobs:
build:
strategy:
matrix:
targetos: [linux, windows]
arch: [amd64]
targetos: [linux, windows, darwin]
include:
- targetos: darwin
arch: arm64
runs-on: ubuntu-latest
name: build quicksilver
steps:
Expand Down Expand Up @@ -87,5 +90,23 @@ jobs:
flags: unittests
fail_ci_if_error: true
verbose: true
simulate:
if: contains(github.event.pull_request.labels.*.name, 'run-sim')
runs-on: ubuntu-latest
name: simulate quicksilver
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v3
with:
go-version: 1.19


- name: Run simulation tests
run: make test-sim-ci
13 changes: 13 additions & 0 deletions .github/workflows/md-link-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ignorePatterns": [
{
"_comment": "fill out if we need to ignore"
}
],
"baseUrl": "https://docs.quicksilver.zone/",
"projectBaseUrl": "https://docs.quicksilver.zone/",
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s"
}
17 changes: 17 additions & 0 deletions .github/workflows/md-link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: check markdown links

on:
schedule:
- cron: '0 0 * * 0' # run once a week

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: gaurav-nelson/[email protected]
if: env.GIT_DIFF
with:
folder-path: "."
use-verbose-mode: 'yes'
config-file: '.github/workflows/md-link-checker-config.json'
12 changes: 5 additions & 7 deletions .github/workflows/simulation.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: simulate quicksilver

on:
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 0' # run once a week

jobs:
test:
if: contains(github.event.pull_request.labels.*.name, 'run-sim')
simulate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
Expand All @@ -24,4 +22,4 @@ jobs:
go-version: 1.19.6

- name: Run simulation tests
run: make test-sim-ci
run: make test-sim-non-determinism

0 comments on commit b7428ac

Please sign in to comment.