Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
Update CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Dec 16, 2021
1 parent 84f6fdc commit 503d665
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 30 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,38 @@ on:
push:
branches:
- dev
- next

jobs:
deploy-docs:
runs-on: ubuntu-latest

steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/[email protected]

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

- name: Generate docs
run: dartdoc

- 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/[email protected]
env:
Expand All @@ -36,4 +44,4 @@ jobs:
SOURCE: "doc/api/"
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }}
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx_commander/"
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx_commander/${{ steps.extract_branch.outputs.branch }}/"
13 changes: 12 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ jobs:
nyxx_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: 'publish nyxx package to pub.dev'
id: publish
uses: k-paxian/dart-package-publisher@master
Expand All @@ -18,6 +28,7 @@ jobs:
force: true
suppressBuildRunner: true
credentialJson: ${{ secrets.CREDENTIAL_JSON }}

- name: 'Commit release tag'
if: steps.publish.outputs.success
uses: hole19/git-tag-action@master
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/[email protected]

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

Expand All @@ -36,18 +37,19 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/[email protected]

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

Expand All @@ -61,12 +63,6 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

Expand All @@ -76,16 +72,20 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Cache
uses: actions/cache@v2
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 --coverage="coverage" test/unit/**

- name: Integration tests
run: dart run test --coverage="coverage" test/integration/**
continue-on-error: true

- name: Format coverage
run: dart run coverage:format_coverage --lcov --in=coverage --out=coverage/coverage.lcov --packages=.packages --report-on=lib

Expand Down

0 comments on commit 503d665

Please sign in to comment.