Skip to content

docs: add 2.0 proposal note (#506) #573

docs: add 2.0 proposal note (#506)

docs: add 2.0 proposal note (#506) #573

Workflow file for this run

name: Lint
on:
push:
branches:
- main
- v1.0.0
pull_request:
types:
- unlocked
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling with custom config file
uses: crate-ci/typos@v1.13.14
with:
config: ./typos.toml
diff:
runs-on: ubuntu-latest
outputs:
golang: ${{ steps.filter.outputs.golang }}
js: ${{ steps.filter.outputs.js }}
helmcharts: ${{ steps.filter.outputs.helmcharts }}
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
base: main
filters: |
golang:
- "api-server/**"
- "common/**"
- "schemas/**"
js:
- "dashboard/**"
helmcharts:
- "helm/**"
docs:
- requirements/docs-requirements.txt
- "docs/**"
eslint:
runs-on: ubuntu-latest
needs:
- diff
if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.js == 'true') || github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: '**/dashboard/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/dashboard/yarn.lock') }}
- name: Install packages
run: cd dashboard; yarn
- name: Run eslint
run: cd dashboard; yarn lint
golint:
runs-on: ubuntu-latest
needs:
- diff
if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.golang == 'true') || github.event_name == 'push' }}
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20' # The Go version to download (if necessary) and use.
- uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: 'v1.52.2'
helmchartslint:
runs-on: ubuntu-latest
needs:
- diff
if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.helmcharts == 'true') || github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
- name: Run chart-testing (lint)
working-directory: ./helm/yatai
run: make lint
- name: Render Helm Template
working-directory: ./helm/yatai
run: make template
docslint:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
needs:
- diff
if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.docs == 'true') || github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get pip cache dir
id: cache-dir
run: |
echo ::set-output name=dir::$(pip cache dir)
- name: Cache pip dependencies
uses: actions/cache@v3
id: cache-pip
with:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-docs-${{ hashFiles('requirements/docs-requirements.txt') }}
- name: Install dependencies
run: |
pip install -r requirements/docs-requirements.txt
- name: Install libenchant
run: |
sudo apt-get update && sudo apt-get install -y libenchant-2-dev
- name: Run spellcheck script
run: make spellcheck-docs
shell: bash
- name: Run linkcheck script
run: make linkcheck-docs
shell: bash