Skip to content

Commit

Permalink
chore: fix some workflows (#3254)
Browse files Browse the repository at this point in the history
* add conditions to lint check

* lint

* delete cosmoverse

* conditional

* try integration

* fix

* fix

* attempt test

* integration

* docs deploy

* md-lint fix

* check testdata changes for tests

* remove md-link-checker

* re-add link check
  • Loading branch information
Alex Johnson committed Dec 9, 2022
1 parent 1f84fcf commit 597e70f
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 75 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/docs-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,31 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0

- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
./docs/**.md
- name: Cache node_modules
uses: actions/cache@v3
if: env.GIT_DIFF
with:
path: docs/node_modules
key: node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Setup node
uses: actions/setup-node@v3
if: env.GIT_DIFF
with:
node-version: 16.x
cache: yarn
cache-dependency-path: docs/yarn.lock

- name: Install Dependencies
run: yarn install
if: env.GIT_DIFF
working-directory: ./docs

- name: Build
Expand All @@ -37,6 +45,7 @@ jobs:

- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
if: env.GIT_DIFF
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_IGNTSERVICES }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/md-link-checker-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s"
}
}
12 changes: 10 additions & 2 deletions .github/workflows/md-link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
name: Check Markdown links
on: push
on:
push:
branches:
- main
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/*.md
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
if: env.GIT_DIFF
with:
folder-path: "."
use-verbose-mode: 'yes'
config-file: '.github/workflows/md-link-checker-config.json'
config-file: '.github/workflows/md-link-checker-config.json'
66 changes: 0 additions & 66 deletions .github/workflows/release-cosmoverse.yml

This file was deleted.

15 changes: 13 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
- name: Finding files and store to output
id: set-matrix
run: echo "matrix=$({ cd integration && find . -type d ! -name testdata -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT
Expand All @@ -29,8 +29,17 @@ jobs:
matrix:
test-path: ${{fromJson(needs.pre-test.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/testdata/**
- uses: actions/cache@v3
if: env.GIT_DIFF
with:
path: |
~/.cache/go-build
Expand All @@ -39,9 +48,11 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v3
if: env.GIT_DIFF
with:
go-version: 1.19
- name: Run Integration Tests
if: env.GIT_DIFF
run: GOSUMDB=off go test -v -timeout 60m ./integration/${{ matrix.test-path }}

status:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/*.go
go.mod
go.sum
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: golangci/golangci-lint-action@master
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.50.1
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,30 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/testdata/**
- uses: actions/setup-go@v3
if: env.GIT_DIFF
with:
go-version: 1.19
cache: true
cache-dependency-path: go.sum

- run: ./scripts/test-coverage
if: env.GIT_DIFF

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
if: env.GIT_DIFF
with:
file: ./coverage.txt
fail_ci_if_error: true
verbose: true

0 comments on commit 597e70f

Please sign in to comment.