Skip to content

Commit

Permalink
Adding eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Raduc4 committed Jan 23, 2024
1 parent 70b4f5d commit b28a2a0
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 70 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
pull_request:

jobs:
eslint:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install node v20
uses: actions/setup-node@v1
with:
node-version: 20
- name: yarn install
run: yarn install
- name: eslint
uses: icrawl/action-eslint@v1
with:
custom-glob: apps # only if a different glob is needed, default: src
140 changes: 70 additions & 70 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
name: Validate PR
on:
workflow_call:
pull_request:
# name: Validate PR
# on:
# workflow_call:
# pull_request:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.head_ref || github.run_id }}
# cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
# 40 MiB stack
RUST_MIN_STACK: 40971520
RUST_LOG: "citadel=warn"
# env:
# CARGO_TERM_COLOR: always
# RUST_BACKTRACE: full
# # 40 MiB stack
# RUST_MIN_STACK: 40971520
# RUST_LOG: "citadel=warn"

jobs:
fmt:
name: Cargo Fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Avarok-Cybersecurity/gh-actions-deps@master
- run: cargo fmt --check
clippy:
name: Cargo Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Avarok-Cybersecurity/gh-actions-deps@master
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- run: cargo clippy --all -- -D warnings
test:
name: Cargo Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: Avarok-Cybersecurity/gh-actions-deps@master
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- run: cargo test
tauri-build:
name: Tauri Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- uses: Avarok-Cybersecurity/gh-actions-deps@master
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: oven-sh/setup-bun@v1
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- run: cargo install create-tauri-app
- run: cargo install tauri-cli --version 2.0.0-alpha.21
- run: bun install
- run: cargo tauri build
# jobs:
# fmt:
# name: Cargo Fmt
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - run: cargo fmt --check
# clippy:
# name: Cargo Clippy
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: install dependencies (ubuntu only)
# run: |
# sudo apt-get update
# sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# - run: cargo clippy --all -- -D warnings
# test:
# name: Cargo Test
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# steps:
# - uses: actions/checkout@v2
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: install dependencies (ubuntu only)
# if: matrix.platform == 'ubuntu-latest'
# run: |
# sudo apt-get update
# sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# - run: cargo test
# tauri-build:
# name: Tauri Build
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# steps:
# - uses: actions/checkout@v2
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: setup node
# uses: actions/setup-node@v4
# with:
# node-version: 20
# - uses: oven-sh/setup-bun@v1
# - name: install dependencies (ubuntu only)
# if: matrix.platform == 'ubuntu-latest'
# run: |
# sudo apt-get update
# sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# - run: cargo install create-tauri-app
# - run: cargo install tauri-cli --version 2.0.0-alpha.21
# - run: bun install
# - run: cargo tauri build

0 comments on commit b28a2a0

Please sign in to comment.