Skip to content

Commit

Permalink
Merge pull request #64 from 21CSM/develop-firebase
Browse files Browse the repository at this point in the history
develop-firebase -> main
  • Loading branch information
21CSM authored Oct 2, 2024
2 parents 14ac232 + b8a753d commit 4e6c2a1
Show file tree
Hide file tree
Showing 52 changed files with 24,899 additions and 19 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "ars-antiqua"
}
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
versioning-strategy: auto
commit-message:
prefix: "build"
include: "scope"
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build
on:
push:
branches: [develop-firebase]

jobs:
flake-health-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Flake Health
uses: DeterminateSystems/flake-checker-action@v9

build:
runs-on: ubuntu-latest
needs: flake-health-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run Nix Flake Checks
run: nix flake check
- name: Install Dependencies
run: nix develop -c pnpm install
- name: Run Unit Tests
run: nix develop -c pnpm run test:unit:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Integration Tests
run: nix develop -c pnpm run test:integration
- name: Build Project
run: nix develop -c pnpm run build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build
80 changes: 80 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Deploy Preview
on:
pull_request:
branches: [develop-firebase, main]
workflow_dispatch:

jobs:
flake-health-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Flake Health
uses: DeterminateSystems/flake-checker-action@v9

build:
runs-on: ubuntu-latest
needs: flake-health-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run Nix Flake Checks
run: nix flake check
- name: Install Dependencies
run: nix develop -c pnpm install
- name: Run Unit Tests
run: nix develop -c pnpm run test:unit:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Integration Tests
run: nix develop -c pnpm run test:integration
- name: Build Project
run: nix develop -c pnpm run build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build

changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'src/**'
deploy-preview:
needs: [build, changes]
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.src == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Deploy to Firebase Preview
if: github.actor != 'dependabot[bot]'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ARS_ANTIQUA }}
projectId: ars-antiqua
channelId: preview
80 changes: 80 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build
on:
push:
branches: [main]

jobs:
flake-health-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Flake Health
uses: DeterminateSystems/flake-checker-action@v9

build:
runs-on: ubuntu-latest
needs: flake-health-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run Nix Flake Checks
run: nix flake check
- name: Install Dependencies
run: nix develop -c pnpm install
- name: Run Unit Tests
run: nix develop -c pnpm run test:unit:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Integration Tests
run: nix develop -c pnpm run test:integration
- name: Build Project
run: nix develop -c pnpm run build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build

changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'src/**'
deploy-preview:
needs: [build, changes]
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.src == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Deploy to Firebase
if: github.actor != 'dependabot[bot]'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ARS_ANTIQUA }}
projectId: ars-antiqua
channelId: live

18 changes: 0 additions & 18 deletions .github/workflows/github-actions-demo.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update flake.lock

on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
lockfile:
name: Run update
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Check Flake Health
uses: DeterminateSystems/flake-checker-action@v9
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v24
with:
commit-msg: "build(flake): update flake.lock"
pr-assignees: 21CSM
pr-reviewers: 21CSM
pr-title: "build(flake): update flake.lock"

44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# Nix
result
result-*

# direnv
.direnv/

# macOS
.DS_Store
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Node
node_modules/
dist
dist-ssr
*.local
.vite/
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.output
.vercel
/.svelte-kit
/build
test-results/
coverage/

# Firebase
.firebase/
firebase-debug.log
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock

# Build
flake.lock

# CI
.github/

# Editor
.vscode/

# Documentation
README.md
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
Loading

0 comments on commit 4e6c2a1

Please sign in to comment.