Skip to content

Commit

Permalink
chore: add CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-apprentice committed Jun 30, 2024
1 parent 835b61f commit 2e76a7d
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 38 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: test and analyze

on:
workflow_dispatch:
push:
branches: [ "develop", "master" ]
paths:
- 'src/**'
- '__tests__/**'
pull_request:
branches: [ "develop", "master" ]
paths:
- 'src/**'
- '__tests__/**'


jobs:
test:
name: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
steps:

- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: set environment variables
run: |
touch .env
echo "TURSO_URL=${{ secrets.TURSO_URL }}" >> .env
echo "TURSO_DB_TOKEN=${{ secrets.TURSO_DB_TOKEN }}" >> .env
- name: install dependencies and test
run: |
bun install
bun test
analyze:
name: Analyze (${{ matrix.language }})
needs: [test]
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
38 changes: 0 additions & 38 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 2e76a7d

Please sign in to comment.