dart-sass/.github/workflows/ci.yml

100 lines
3.1 KiB
YAML
Raw Normal View History

2021-01-20 22:21:05 +01:00
name: CI
env:
protoc_version: '3.x'
on:
push:
branches: [master, feature.*]
tags: ['**']
pull_request:
jobs:
dart_tests:
name: "Dart tests | Dart ${{ matrix.dart_channel }} | ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
dart_channel: [stable]
include: [{os: ubuntu-latest, dart_channel: dev}]
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
- uses: dart-lang/setup-dart@v1
with: {sdk: "${{ matrix.dart_channel }}"}
2021-01-20 22:21:05 +01:00
- run: dart pub get
- run: dart pub run grinder protobuf
- run: dart pub run grinder pkg-standalone-dev
- name: Run tests
run: dart pub run test -r expanded
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
- uses: dart-lang/setup-dart@v1
2021-01-20 22:21:05 +01:00
- run: dart pub get
- run: dart pub run grinder protobuf
- name: Analyze dart
run: dartanalyzer --fatal-warnings ./
deploy_github_linux:
name: "Deploy Github: Linux"
runs-on: ubuntu-latest
needs: [dart_tests, static_analysis]
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'"
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
- uses: dart-lang/setup-dart@v1
2021-01-20 22:21:05 +01:00
- run: dart pub get
- run: dart pub run grinder protobuf
- name: Deploy
run: dart pub run grinder pkg-github-release pkg-github-linux
env: {GH_BEARER_TOKEN: "${{ github.token }}"}
2021-01-20 22:21:05 +01:00
deploy_github_macos:
name: "Deploy Github: Mac OS"
runs-on: macos-latest
needs: [deploy_github_linux]
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'"
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
- uses: dart-lang/setup-dart@v1
2021-01-20 22:21:05 +01:00
- run: dart pub get
- run: dart pub run grinder protobuf
- name: Deploy
run: dart pub run grinder pkg-github-macos
env: {GH_BEARER_TOKEN: "${{ github.token }}"}
2021-01-20 22:21:05 +01:00
deploy_github_windows:
name: "Deploy Github: Windows"
runs-on: windows-latest
needs: [deploy_github_linux]
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'"
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
- uses: dart-lang/setup-dart@v1
2021-01-20 22:21:05 +01:00
- run: dart pub get
- run: dart pub run grinder protobuf
- name: Deploy
run: dart pub run grinder pkg-github-windows
env: {GH_BEARER_TOKEN: "${{ github.token }}"}