Test Modules #116
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: Test Modules | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
GIT_CONFIG_NAME: "[Automated] Yui" | |
GIT_CONFIG_EMAIL: [email protected] | |
GIT_OUTPUT_DIR: dist/summary | |
GIT_OUTPUT_BRANCH: summary | |
GIT_COMMIT_MSG: "[automated] update summary (${{ github.sha }})" | |
jobs: | |
test: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/setup-dart@v1 | |
- name: 🚧 Do prerequisites | |
run: | | |
dart pub get | |
- name: 🧪 Test modules | |
run: dart run ./test/all.dart --ci | |
- name: 🚀 Upload summary | |
if: always() | |
working-directory: ${{ env.GIT_OUTPUT_DIR }} | |
run: | | |
git init | |
git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" | |
git config --local user.name "${{ env.GIT_CONFIG_NAME }}" | |
git config --local user.email "${{ env.GIT_CONFIG_EMAIL }}" | |
git switch -c ${{ env.GIT_OUTPUT_BRANCH }} | |
git add . | |
git commit --allow-empty -m "${{ env. GIT_COMMIT_MSG }}" | |
git push -u origin ${{ env.GIT_OUTPUT_BRANCH }} --force |