Skip to content

Commit

Permalink
BREAKING!: v3-beta (#698)
Browse files Browse the repository at this point in the history
BREAKING!: v3-beta
  • Loading branch information
crookse authored Oct 10, 2023
1 parent 3dc1ccf commit ecbabb4
Show file tree
Hide file tree
Showing 246 changed files with 17,081 additions and 17,311 deletions.
29 changes: 0 additions & 29 deletions .github/release_drafter_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,6 @@ version-resolver:

# What our release will look like. If no draft has been created, then this will be used, otherwise $CHANGES just gets addedd
template: |
## Compatibility
Requires Deno v<version>
Uses Deno Standard Modules <version>
## Documentation
* [Full Documentation](https://drash.land/drash/v2.x/getting-started/introduction)
## Usage
1. Create a `deps.ts` file.
```typescript
// deps.ts
export * as Drash from "https://deno.land/x/drash@v$RESOLVED_VERSION/mod.ts";
```
2. Import `Drash` from your `deps.ts` file.
```typescript
import { Drash } from "./deps.ts"
... your
... code
... here
```
## Release Summary
$CHANGES
166 changes: 166 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: main

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:

compat-cloudflare:
name: Compat - Cloudflare

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.x, 18.x, 20.x]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Deno (for `deno task` command)
uses: denoland/setup-deno@v1

- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Node dependencies
run: |
yarn install
- name: Run Tests
run: |
deno task build:all:ci && deno task test:compat:cloudflare
compat-bun:
name: Compat - Bun

strategy:
matrix:
# Add Windows when https://github.com/oven-sh/bun/issues/43 is complete
os: [ubuntu-latest, macos-latest]
node-version: [16.x, 18.x, 20.x]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Deno (for `deno task` command)
uses: denoland/setup-deno@v1

- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Node dependencies
run: |
yarn install
- name: Install Bun
run: |
curl -fsSL https://bun.sh/install | bash
- name: Run Tests
run: |
deno task build:all:ci && ~/.bun/bin/bun test tests/compat/bun
compat-deno:
name: Compat - Deno

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Deno
uses: denoland/setup-deno@v1

- name: Run Tests
run: |
deno task test:compat:deno
- name: Run Tests (concurrency)
run: |
deno task test:compat:deno:concurrency
compat-node:
name: Compat - Node

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.x, 18.x, 20.x]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Deno (for `deno task` command)
uses: denoland/setup-deno@v1

- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Instal Node dependencies
run: |
yarn install
- name: Run Tests
run: |
deno task build:all:ci && deno task test:compat:node
# benchmarks:
# strategy:
# matrix:
# os: [ubuntu-latest]

# runs-on: ${{ matrix.os }}

# steps:
# - uses: actions/checkout@v3

# - name: Install Deno
# uses: denoland/setup-deno@v1

# - name: Setup Node 13
# uses: actions/setup-node@v3
# with:
# node-version: '13'

# - name: Install Autocannon
# run: npm install -g autocannon

# - name: Run Drash application
# run: deno run --allow-net ./console/benchmark_app.ts &

# - name: Run Autocannon against Drash application
# run: autocannon -c 40 -d 10 -j http://localhost:1447

# code_quality:
# # Only one OS is required since fmt is cross platform
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3

# - name: Install Deno
# uses: denoland/setup-deno@v1

# - name: "Check: deno lint"
# run: deno lint src

# - name: "Check deno fmt"
# run: deno fmt --check
74 changes: 0 additions & 74 deletions .github/workflows/master.yml

This file was deleted.

80 changes: 72 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,79 @@ name: Release
on:
release:
types: [published]

# In the even this workflow fails, it can be started manually via `workflow_dispatch`
workflow_dispatch:

jobs:
publish-egg:

npm:
runs-on: ubuntu-latest
steps:
- name: Notify the castle about this release
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_USER_PAT }}

# We need deno because the "Build CJS and ESM" step runs `deno run`
- name: Install Deno
uses: denoland/setup-deno@v1

- name: Pre-check release version
run: |
curl -X POST \
-u "${{ secrets.CI_USER_NAME }}:${{ secrets.CI_USER_PAT }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
--data '{"event_type": "release", "client_payload": { "repo": "deno-drash", "module": "drash", "version": "${{ github.ref }}" }}' \
https://api.github.com/repos/drashland/castle/dispatches
deno run --allow-read ./scripts/pre_check_release.ts ${{ github.event.release.tag_name }}
# Setup .npmrc file to publish to npm
- name: Install Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
scope: '@drashland'

- name: Install Node dependencies
run: yarn install

- name: Build Drash libs
run: |
deno task build:all:ci
cp package.lib.json .drashland/lib/package.json
# - name: Publish
# run: |
# cd .drashland/lib
# yarn publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_USER_PAT }}

# We need deno because the "Build CJS and ESM" step runs `deno run`
- name: Install Deno
uses: denoland/setup-deno@v1

# Setup .npmrc file to publish to github
- name: Install Node
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@drashland'

- name: Install deps
run: |
yarn install
- name: Build Drash libs
run: |
deno task build:all:ci
cp package.lib.json .drashland/lib/package.json
# - name: Publish
# run: |
# cd .drashland/lib
# yarn publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit ecbabb4

Please sign in to comment.