Skip to content

Commit

Permalink
Lisätty lint ja next env pystytys github actioniin
Browse files Browse the repository at this point in the history
  • Loading branch information
hajoa committed Nov 28, 2024
1 parent 4870602 commit 6bae278
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/actions/setup-next-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: setup-next-env
description: 'Setup Next.js environment'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: src/maksut-ui/package-lock.json
- uses: actions/cache@v4
id: node_modules-cache
with:
path: ${{ github.workspace }}/src/maksut-ui/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
- name: Cache Next.js
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/src/maksut-ui/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package-lock.json') }}-${{ hashFiles('next.config.*', './src/**/*.ts', './src/**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('package-lock.json') }}-
- name: Install npm dependencies
if: steps.node_modules-cache.outputs.cache-hit != 'true'
shell: bash
run: |
cd src/maksut-ui
npm ci
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
- name: Prepare clojure env
uses: ./.github/actions/prepare-clojure-env

- name: Set up Next env
uses: ./.github/actions/setup-next-env

- name: Lint maksut-ui
run: |
cd src/maksut-ui
npm run lint
- name: Run tests and build uberjar
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
Expand Down

0 comments on commit 6bae278

Please sign in to comment.