init #5
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 | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt, clippy | |
- name: Cargo cache | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
path: ~/.cargo/registry | |
- name: install MoonBit | |
run: | | |
curl -fsSLv https://cli.moonbitlang.com/install/unix.sh | bash -s | |
echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
- name: Version | |
run: moon version --all | |
- name: Build | |
run: | | |
cargo build --release | |
./target/release/moon_dashboard --file repos.txt | |
- name: Install duckdb | |
run: brew install duckdb | |
- name: Query | |
run: duckdb -c ".read query.sql" | |
- name: Commit | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add data.csv | |
git commit -m "Update data.csv" || echo "No changes to commit" | |
- name: Push changes | |
run: git push |