Skip to content

Commit

Permalink
chore: Update deps, move to npm (#8)
Browse files Browse the repository at this point in the history
* Update ci.yml

* Move to npm, fix prettier path

* Update ci.yml

* Update ci.yml

* Update ci.yml
  • Loading branch information
MatiasG19 authored Apr 21, 2024
1 parent 240c2cf commit a5df401
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 37 deletions.
39 changes: 11 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci

on: [push, pull_request]
on: [push]

env:
SERVER_PATH: server/src/
Expand All @@ -16,7 +16,7 @@ jobs:
- arduino:avr:uno
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Arduino CLI
uses: arduino/compile-sketches@v1
Expand All @@ -30,20 +30,19 @@ jobs:
Server-Format-Check:
needs: [Server-Compile]

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Setup Clang Formatter
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
path: ci
Expand All @@ -56,33 +55,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "YARN_CACHE_DIR_PATH=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache yarn dependencies
uses: actions/cache@v3
id: yarn-cache
uses: actions/setup-node@v4
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.YARN_CACHE_DIR_PATH }}
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20.x

- name: Install dependecies
working-directory: ${{ env.WEB_PATH }}
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
run: npm ci

- name: Check format
working-directory: ${{ env.WEB_PATH }}
run: yarn check-format
run: npm run check-format
35 changes: 35 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"license": "GNU GPL V3",
"private": true,
"scripts": {
"check-format": "yarn prettier --check ."
"check-format": "npx prettier --check ./src"
},
"devDependencies": {
"prettier": "2.8.8"
},
"engines": {
"node": "^20",
"npm": ">= 10.2.4"
}
}
8 changes: 0 additions & 8 deletions web/yarn.lock

This file was deleted.

0 comments on commit a5df401

Please sign in to comment.