Skip to content

DONT REVIEW

DONT REVIEW #202

Workflow file for this run

name: CI
on:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: '0 18 * * *' # 02:00 AM UTC+8
env:
CARGO_TERM_COLOR: always
GITHUB_ACTION_RUN_ID: ${{ github.run_id }}
GITHUB_ACTION_RUN_NUMBER: ${{ github.run_number }}
permissions:
contents: write
pull-requests: write
actions: write # 用于上传/下载 artifacts
jobs:
collect-data:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-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(Unix)
if: ${{ matrix.os != 'windows-latest' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: install MoonBit(Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Version
run: moon version --all
- name: moon update
run: |
moon update
- name: Build
run: |
cargo build --release
env UPDATE_EXPECT=1 cargo test
./target/release/moon_dashboard stat --file repos.txt
- name: Upload data
uses: actions/upload-artifact@v4
with:
name: data-${{ matrix.os }}
path: |
${{ matrix.os == 'macos-latest' && './webapp/public/mac/latest_data.jsonl.gz' ||
matrix.os == 'windows-latest' && './webapp/public/windows/latest_data.jsonl.gz' ||
'./webapp/public/linux/latest_data.jsonl.gz' }}
if-no-files-found: error