Skip to content

Commit

Permalink
Merge branch 'main' into docs/more-docs-and-typos
Browse files Browse the repository at this point in the history
# Conflicts:
#	dartdoc_options.yaml
#	lib/src/builders/guild/auto_moderation.dart
  • Loading branch information
l7ssha committed Nov 1, 2024
2 parents 0caaaaa + 5d60dcc commit 1bdfeb5
Show file tree
Hide file tree
Showing 202 changed files with 7,658 additions and 2,419 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Deploy dev docs to nyxx.l7ssha.xyz
on:
push:
branches:
- dev
- next

jobs:
Expand All @@ -15,10 +14,10 @@ jobs:
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
Expand All @@ -31,17 +30,13 @@ jobs:
- name: Generate docs
run: dart doc

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Deploy nyxx dev docs
uses: easingthemes/ssh-deploy@v2.1.5
uses: easingthemes/ssh-deploy@v5.1.0
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }}
ARGS: "-rltDzvO"
SOURCE: "doc/api/"
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx/${{ github.head_ref || github.ref_name }}/"
with:
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }}
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx/${{ steps.extract_branch.outputs.branch }}/"
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }}
35 changes: 0 additions & 35 deletions .github/workflows/integration_tests.yml

This file was deleted.

29 changes: 5 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish nyxx to pub.dev
name: Publish package to pub.dev

on:
push:
branches:
- main
release:
types:
- created

jobs:
nyxx_publish:
Expand All @@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
Expand All @@ -28,22 +28,3 @@ jobs:
force: true
suppressBuildRunner: true
credentialJson: ${{ secrets.CREDENTIAL_JSON }}

- name: 'Commit release tag'
if: steps.publish.outputs.success
uses: hole19/git-tag-action@master
env:
TAG: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}}
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }}

- name: 'Create Release'
if: steps.publish.outputs.success
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }}
with:
tag_name: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}}
release_name: ${{steps.publish.outputs.localVersion}}
body: See CHANGELOG.md for the changes in this version.
draft: false
prerelease: false
139 changes: 139 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Test

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

jobs:
analyze:
name: dart analyze
runs-on: ubuntu-latest
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Analyze project source
run: dart analyze

fix:
name: dart fix
runs-on: ubuntu-latest
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Analyze project source
run: dart fix --dry-run

format:
name: dart format
runs-on: ubuntu-latest
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Format
run: dart format --set-exit-if-changed -l 160 ./lib

unit-tests:
needs: [ format, analyze, fix ]
name: Unit tests
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Unit tests
run: dart run test test/unit/**

integration-tests:
name: Integration tests
needs: [ format, analyze, fix ]
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Integration tests
run: dart run test test/integration/**
85 changes: 0 additions & 85 deletions .github/workflows/unit_tests.yml

This file was deleted.

Loading

0 comments on commit 1bdfeb5

Please sign in to comment.