From fe61422ea2e73c8077f08335fb8ad1bae23c2781 Mon Sep 17 00:00:00 2001 From: Tanguy Busschaert Date: Wed, 16 Oct 2024 20:35:08 +0200 Subject: [PATCH] Feature/11 (#12) * add auto EOL * add frontend admin CI * add frontend admin CI --- .github/workflows/nodejs-empty.yml | 14 ++++++++++++ .github/workflows/nodejs.yml | 34 ++++++++++++++++++++++++++++++ frontend/admin/eslint.config.js | 10 +++++++++ 3 files changed, 58 insertions(+) create mode 100644 .github/workflows/nodejs-empty.yml create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs-empty.yml b/.github/workflows/nodejs-empty.yml new file mode 100644 index 0000000..97ac3ab --- /dev/null +++ b/.github/workflows/nodejs-empty.yml @@ -0,0 +1,14 @@ +name: frontend-admin-pr + +on: + pull_request: + branches: + - "main" + paths-ignore: + - "frontend/admin/**" + +jobs: + frontend-admin-pr-build: + runs-on: ubuntu-latest + steps: + - run: 'echo "No frontend admin build required"' \ No newline at end of file diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..e3eb8d3 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,34 @@ +name: frontend-admin-pr + +on: + pull_request: + branches: + - "main" + paths: + - "frontend/admin/**" + +jobs: + frontend-admin-pr-build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: "./frontend/admin" + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + cache: 'npm' + cache-dependency-path: './frontend/admin/package-lock.json' + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install packages + run: npm ci + - name: Build + run: npm run build + - name: Lint + run: npm run lint \ No newline at end of file diff --git a/frontend/admin/eslint.config.js b/frontend/admin/eslint.config.js index 41ae05e..e00224e 100644 --- a/frontend/admin/eslint.config.js +++ b/frontend/admin/eslint.config.js @@ -48,4 +48,14 @@ export default tseslint.config( }, }, eslintPluginPrettierRecommended, + { + rules: { + "prettier/prettier": [ + "error", + { + endOfLine: "auto", + }, + ], + }, + }, );