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

Add format check to build #42

Open
wants to merge 2 commits into
base: main
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
13 changes: 6 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
# GitHub Dependabot configuration file
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'

# Maintain dependencies for JS/yarn
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
12 changes: 6 additions & 6 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ name: Lint GitHub Actions workflows
on:
push:
branches:
- "main"
- 'main'
paths:
- '.github/workflows/*.ya?ml'
pull_request:
branches:
- "main"
- 'main'
paths:
- '.github/workflows/*.ya?ml'

Expand All @@ -27,22 +27,22 @@ jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- name: "Harden Runner"
- name: 'Harden Runner'
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: "Checkout"
- name: 'Checkout'
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

- name: "Download actionlint"
- name: 'Download actionlint'
id: get_actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/2d26fef7e97b8ab345791f5ade3252da47d083e3/scripts/download-actionlint.bash)

- name: "Check workflow files"
- name: 'Check workflow files'
run: |
echo "::add-matcher::.github/workflows/matchers/actionlint.json"
${{ steps.get_actionlint.outputs.executable }} -color
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ name: Lint Markdown documents
on:
push:
branches:
- "main"
- 'main'
paths:
- '**/*.md'
- '.markdownlint-cli2.yaml'
- '.github/workflows/docs.yml' # This workflow
pull_request:
branches:
- "main"
- 'main'
paths:
- '**/*.md'
- '.markdownlint-cli2.yaml'
Expand All @@ -32,15 +32,15 @@ jobs:
markdown-lint:
runs-on: ubuntu-latest
steps:
- name: "Harden Runner"
- name: 'Harden Runner'
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: "Checkout"
- name: 'Checkout'
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
- name: "Check Markdown documents"
- name: 'Check Markdown documents'
uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0
with:
globs: '**/*.md'
17 changes: 9 additions & 8 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ jobs:
with:
node-version: '20'
cache: yarn
- name: Setup Pages
uses: actions/configure-pages@v4
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
Expand All @@ -62,6 +54,15 @@ jobs:
run: yarn install
- name: Lint check
run: yarn lint
- name: Format check
run: yarn format:check
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/[email protected]
timeout-minutes: 15
with:
detached: false
limit-access-to-actor: true
- name: Build with Next.js
run: yarn build
- name: Upload artifact
Expand Down
8 changes: 4 additions & 4 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ config:
no-duplicate-header: false
single-trailing-newline: false
globs:
- "**/*.md"
- '**/*.md'
ignores:
- ".tox/**"
- "venv/**"
- ".venv/**"
- '.tox/**'
- 'venv/**'
- '.venv/**'
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const path = require('path'); // eslint-disable-line @typescript-eslint/no-var-r

const nextConfig = {
output: 'export',
basePath: '',
reactStrictMode: true,

compiler: {
Expand Down