diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..03ec442 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly + day: friday diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5550a7e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +# adapted from https://github.com/denoland/std/blob/main/.github/workflows/workspace_publish.yml + +name: ci + +on: + push: + branches: + - main + - dev/* + - chore/* + - feature/* + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +jobs: + test-deno: + runs-on: ${{ matrix.os }} + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - windows-latest + - macOS-latest + + steps: + - name: Clone repository + uses: actions/checkout@v4 + + - name: Set up Deno + uses: denoland/setup-deno@v2 + with: + deno-version: canary + + - name: Format & Check + run: deno run check + + # - name: Test + # run: deno task test + + - name: Publish dry run + run: deno publish --dry-run + if: matrix.os == 'ubuntu-latest' diff --git a/deno.jsonc b/deno.jsonc index a5877cf..cd83705 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -6,13 +6,13 @@ "noImplicitOverride": true, "noUncheckedIndexedAccess": true }, - "exclude": [".git"], + "exclude": [".git", ".github"], "fmt": { "useTabs": true, "lineWidth": 120, "semiColons": false, "singleQuote": true, - "exclude": ["**/*.md"] + "exclude": ["**/*.md", "**/*.yml", "**/*.yaml"] }, "tasks": { "check": "deno fmt --check && deno lint && biome lint" @@ -27,9 +27,9 @@ "no-console" ] }, - "exclude": ["**/*.md"] + "exclude": ["**/*.md", "**/*.yml", "**/*.yaml"] }, - "workspace": ["./check-required-env", "./logger"], + "workspace": ["./check-required-env", "./dates", "./logger"], "imports": { "@biomejs/biome": "npm:@biomejs/biome@^1.9.4", "@types/node": "npm:@types/node@^22.9.0" diff --git a/deno.lock b/deno.lock index 63be893..68922a4 100644 --- a/deno.lock +++ b/deno.lock @@ -1,12 +1,22 @@ { "version": "4", "specifiers": { + "jsr:@frytg/logger@0.0.2": "0.0.2", "npm:@biomejs/biome@1.9.4": "1.9.4", "npm:@biomejs/biome@^1.9.4": "1.9.4", "npm:@types/node@*": "22.5.4", "npm:@types/node@^22.9.0": "22.9.0", + "npm:luxon@^3.5.0": "3.5.0", "npm:winston@^3.17.0": "3.17.0" }, + "jsr": { + "@frytg/logger@0.0.2": { + "integrity": "dc62281aa498bb33e55084a8bdbf90893ea5d82d4628828ff810f6746d3bfcc5", + "dependencies": [ + "npm:winston" + ] + } + }, "npm": { "@biomejs/biome@1.9.4": { "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==", @@ -136,6 +146,9 @@ "triple-beam" ] }, + "luxon@3.5.0": { + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==" + }, "ms@2.1.3": { "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, @@ -243,6 +256,11 @@ "jsr:@frytg/logger@0.0.2" ] }, + "dates": { + "dependencies": [ + "npm:luxon@^3.5.0" + ] + }, "logger": { "dependencies": [ "npm:winston@^3.17.0"