Skip to content

Commit

Permalink
chore: gh action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
elianiva committed Jan 17, 2024
1 parent 9c0d34a commit 4b3e2b0
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "11 18 * * 6"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python, javascript, go, csharp ]

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
50 changes: 50 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
onlyforms:
name: Onlyforms
runs-on: ubuntu-latest
container: node:20
timeout-minutes: 30
services:
db:
image: mongo:latest
volumes:
- dbdata:/data/db
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: latest
run_install: false

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Test
run: pnpm test
env:
MONGO_USERNAME: admin
MONGO_PASSWORD: password
MONGO_HOST: localhost
MONGO_PORT: 27017
MONGO_DB: onlyforms

0 comments on commit 4b3e2b0

Please sign in to comment.