Skip to content

Commit

Permalink
Add GitHub Actions integration
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims authored and frederikprijck committed Aug 25, 2023
1 parent eec419f commit 840b5fb
Show file tree
Hide file tree
Showing 8 changed files with 416 additions and 229 deletions.
212 changes: 0 additions & 212 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build package
description: Build the SDK package

inputs:
node:
description: The Node version to use
required: false
default: 18

runs:
using: composite

steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node }}
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci --include=dev

- name: Build package
shell: bash
run: npm run build
env:
WITH_STATS: true

- name: Get bundle size
shell: bash
run: npm run print-bundle-size

- name: Run `es-check`
shell: bash
run: npm run test:es-check
57 changes: 57 additions & 0 deletions .github/actions/framework/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Run framework test
description: Run tests for a given framework

inputs:
node:
description: The Node version to use
required: false
default: 18
cache:
description: Cache key to restore for build artifacts.
required: true
install:
description: The installation command to run
required: true
content:
description: The SDK entrypoint code to inject.
required: true
import:
description: The SDK's import code to inject.
required: true

runs:
using: composite

steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node }}
cache: 'npm'

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ inputs.cache }}

- name: Install dependencies
shell: bash
run: npm ci

- name: Create application
shell: bash
run: ${{ inputs.install }}

- name: Install SDK
shell: bash
run: |
npm link '../'
${{ inputs.content }}
${{ inputs.import }}
working-directory: my-app

- name: Build application
shell: bash
run: npm run build
working-directory: my-app
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
22 changes: 12 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
name: "CodeQL"
name: CodeQL

on:
merge_group:
push:
branches: [ "master", "beta", "v1" ]
branches: ['master', 'beta', 'v1']
pull_request:
branches: [ "master" ]
branches: ['master']
schedule:
- cron: "56 12 * * 1"
- cron: '56 12 * * 1'

permissions:
actions: read
contents: read
security-events: write

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

strategy:
fail-fast: false
matrix:
language: [ javascript ]
language: [javascript]

steps:
- name: Checkout
Expand All @@ -38,4 +40,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
category: '/language:${{ matrix.language }}'
Loading

0 comments on commit 840b5fb

Please sign in to comment.