diff --git a/.github/workflows/audit-javascript.yml b/.github/workflows/audit-javascript.yml new file mode 100644 index 00000000..ebc33fb5 --- /dev/null +++ b/.github/workflows/audit-javascript.yml @@ -0,0 +1,45 @@ +name: Audit JavaScript + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + push: + branches: + - main + paths: + - '.github/workflows/audit-javascript.yml' + - "**/pnpm-lock.yaml" + - "**/package.json" + pull_request: + branches: + - main + paths: + - '.github/workflows/audit-javascript.yml' + - "**/pnpm-lock.yaml" + - "**/package.json" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + audit-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache pnpm modules + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v2.2.4 + with: + run_install: true + - name: audit + run: pnpm audit \ No newline at end of file diff --git a/.github/workflows/audit-rust.yml b/.github/workflows/audit-rust.yml new file mode 100644 index 00000000..d3640e65 --- /dev/null +++ b/.github/workflows/audit-rust.yml @@ -0,0 +1,33 @@ +name: Audit Rust + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + push: + branches: + - main + paths: + - '.github/workflows/audit-rust.yml' + - "**/Cargo.lock" + - "**/Cargo.toml" + pull_request: + branches: + - main + paths: + - '.github/workflows/audit-rust.yml' + - "**/Cargo.lock" + - "**/Cargo.toml" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + audit-rust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/format-javascript.yml b/.github/workflows/format-javascript.yml new file mode 100644 index 00000000..775a606c --- /dev/null +++ b/.github/workflows/format-javascript.yml @@ -0,0 +1,40 @@ +name: Format JavaScript + +on: + push: + branches: + - main + paths: + - '.github/workflows/format-javascript.yml' + - "client/**" + pull_request: + branches: + - main + paths: + - '.github/workflows/format-javascript.yml' + - "client/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + audit-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache pnpm modules + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v2.2.4 + with: + run_install: true + - name: prettier check + run: pnpm format-check \ No newline at end of file diff --git a/.github/workflows/format-rust.yml b/.github/workflows/format-rust.yml new file mode 100644 index 00000000..9a8e1fd6 --- /dev/null +++ b/.github/workflows/format-rust.yml @@ -0,0 +1,35 @@ +name: Format Rust + +on: + push: + branches: + - main + paths: + - '.github/workflows/format-rust.yml' + - 'src/**' + pull_request: + branches: + - main + paths: + - '.github/workflows/format-rust.yml' + - 'src/**' + +jobs: + format: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: Install rustfmt with nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path=Cargo.toml --all -- --check \ No newline at end of file diff --git a/.github/workflows/lint-javascript.yml b/.github/workflows/lint-javascript.yml new file mode 100644 index 00000000..ca436bde --- /dev/null +++ b/.github/workflows/lint-javascript.yml @@ -0,0 +1,40 @@ +name: Lint JavaScript + +on: + push: + branches: + - main + paths: + - '.github/workflows/lint-javascript.yml' + - "client/**" + pull_request: + branches: + - main + paths: + - '.github/workflows/lint-javascript.yml' + - "client/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + audit-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache pnpm modules + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v2.2.4 + with: + run_install: true + - name: eslint + run: pnpm lint \ No newline at end of file diff --git a/.github/workflows/lint-rust.yml b/.github/workflows/lint-rust.yml new file mode 100644 index 00000000..82987719 --- /dev/null +++ b/.github/workflows/lint-rust.yml @@ -0,0 +1,45 @@ +name: Lint Rust + +on: + push: + branches: + - main + paths: + - '.github/workflows/lint.yml' + - 'src/**' + pull_request: + branches: + - main + paths: + - '.github/workflows/lint.yml' + - 'src/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + clippy: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: install webkit2gtk + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 + - name: Install clippy with stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: clippy + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings + name: clippy \ No newline at end of file