Awesome-T/d2p_gen/.github/workflows/dart.yml@refs/heads/master test Awesome-T/d2p_gen #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
run-name: ${{ github.workflow_ref }} test ${{ github.repository }} | |
permissions: | |
contents: write | |
on: | |
label: | |
types: | |
- created | |
- edited | |
push: | |
branches: | |
- "main" | |
- "dev" | |
- "master" | |
pull_request: | |
branches: | |
- "main" | |
- "dev" | |
- "master" | |
issues: | |
types: | |
- opened | |
- labeled | |
- reopened | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Config Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "$GITHUB_REPOSITORY_OWNER" | |
- name: Cache Dart dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.pub-cache | |
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.yaml') }} | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Exclude example directory | |
run: | | |
mv example/ example_temp/ | |
echo "example/" > .gitignore | |
GIT_INDEX_FILE=.git/index git update-index --assume-unchanged .gitignore | |
- name: Install dependencies | |
run: dart pub get | |
- name: Run tests | |
run: dart test |