Skip to content

v1.1.1

v1.1.1 #222

Workflow file for this run

name: Build and test
on: [push, pull_request]
jobs:
build:
defaults:
run:
working-directory: packages/approval_tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Set up Dart SDK
uses: dart-lang/[email protected]
with:
sdk: stable
- name: 📦 Setup Visual Studio Code
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo snap install code --classic
elif [[ "${{ runner.os }}" == "macOS" ]]; then
brew install --cask visual-studio-code
elif [[ "${{ runner.os }}" == "Windows" ]]; then
choco install vscode
fi
shell: bash
- name: ✔️ Verify Visual Studio Code installation
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
/snap/bin/code --version
elif [[ "${{ runner.os }}" == "macOS" ]]; then
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --version
elif [[ "${{ runner.os }}" == "Windows" ]]; then
"C:\\Program Files\\Microsoft VS Code\\bin\\code" --version
fi
shell: bash
- name: 📦 Setup Android Studio
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo snap install android-studio --classic
elif [[ "${{ runner.os }}" == "macOS" ]]; then
brew install --cask android-studio
elif [[ "${{ runner.os }}" == "Windows" ]]; then
choco install androidstudio
fi
shell: bash
- name: ✔️ Verify Android Studio installation
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
/snap/bin/android-studio --version
elif [[ "${{ runner.os }}" == "macOS" ]]; then
"/Applications/Android Studio.app/Contents/MacOS/studio" --version
elif [[ "${{ runner.os }}" == "Windows" ]]; then
"C:\\Program Files\\Android\\Android Studio\\bin\\studio64.exe" --version
fi
shell: bash
- name: 📦 Install Dependencies
run: |
dart pub global activate coverage
dart pub get
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed .
- name: 🕵️ Analyze
run: dart analyze .
- name: 🧪 Run Tests
run: dart run test --coverage=./coverage && dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
- name: ⬆️ Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}