Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/validate-apps #250

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @vechain/public-repos
25 changes: 25 additions & 0 deletions .github/workflows/validate_apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate Links
on:
workflow_dispatch:

jobs:
validate-links:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
Comment on lines +11 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with:
fetch-depth: 0

validate link does not require full history


- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run validation
run: npm run validate:links
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +23 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: npm run validate:links
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run validate:link

validate link does not need a gh token, PR mode needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks tony!

1 change: 1 addition & 0 deletions scripts/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const checkLink = async (appDir: string) => {
const link = manifest.href

try {
console.log(`checking ${link}`)
await axios.get(link)
} catch (e) {
throw new ValidationError(`${link} is not reachable`)
Expand Down