2023-06-30 14:05:57 +00:00
|
|
|
# This workflow uses actions that are not certified by GitHub.
|
|
|
|
# They are provided by a third-party and are governed by
|
|
|
|
# separate terms of service, privacy policy, and support
|
|
|
|
# documentation.
|
|
|
|
|
|
|
|
# This workflow will install Deno then run `deno lint` and `deno test`.
|
|
|
|
# For more information see: https://github.com/denoland/setup-deno
|
|
|
|
|
|
|
|
name: Deno
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
pull_request:
|
2024-03-15 13:44:17 +00:00
|
|
|
branches: ["*"]
|
2023-06-30 14:05:57 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
TEST_NOTIFICATION_PUBKEY: ${{ vars.TEST_NOTIFICATION_PUBKEY }}
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2023-11-18 15:53:53 +00:00
|
|
|
timeout-minutes: 3
|
2023-06-30 14:05:57 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-03-15 13:44:17 +00:00
|
|
|
deno-version: [1.41.0]
|
2023-06-30 14:05:57 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup repo
|
|
|
|
uses: actions/checkout@v3
|
2023-08-28 17:58:05 +00:00
|
|
|
with:
|
|
|
|
submodules: 'true'
|
2023-06-30 14:05:57 +00:00
|
|
|
|
|
|
|
- name: Setup Deno
|
|
|
|
uses: denoland/setup-deno@v1
|
|
|
|
|
|
|
|
- name: Verify formatting
|
|
|
|
run: make fmt-check
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: make test
|
|
|
|
|
2023-10-24 03:24:27 +00:00
|
|
|
- name: UI test
|
2024-01-01 17:28:10 +00:00
|
|
|
run: make compile-all-ui-tests
|
2023-10-24 03:24:27 +00:00
|
|
|
|
2023-06-30 14:05:57 +00:00
|
|
|
deploy:
|
|
|
|
timeout-minutes: 1
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
id-token: write # Needed for auth with Deno Deploy
|
|
|
|
contents: read # Needed to clone the repository
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v3
|
2023-08-28 17:58:05 +00:00
|
|
|
with:
|
|
|
|
submodules: 'true'
|
2023-06-30 14:05:57 +00:00
|
|
|
|
|
|
|
- name: Setup Deno
|
|
|
|
uses: denoland/setup-deno@v1
|
|
|
|
|
|
|
|
- name: Bundle
|
2024-01-01 17:28:10 +00:00
|
|
|
run: make build
|
2023-06-30 14:05:57 +00:00
|
|
|
|
|
|
|
- name: Upload to Deno Deploy
|
|
|
|
uses: denoland/deployctl@v1
|
|
|
|
with:
|
|
|
|
project: "blowater"
|
2024-03-15 13:44:17 +00:00
|
|
|
entrypoint: https://raw.githubusercontent.com/denoland/deno_std/0.202.0/http/file_server.ts
|
2024-01-01 17:28:10 +00:00
|
|
|
root: build-pwa
|