feat: modrinth tag #26
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: Unit Test | |
on: | |
push: | |
# branches: [main] | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
name: Unit test | |
env: | |
MCIM_CONFIG: ${{ secrets.MCIM_CONFIG }} # 配置文件 | |
REDIS_CONFIG: ${{ secrets.REDIS_CONFIG }} # 配置文件 | |
MONGODB_CONFIG: ${{ secrets.MONGODB_CONFIG }} # 配置文件 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install just | |
uses: extractions/setup-just@v2 | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
- name: Install dependencies | |
run: | | |
just mongodb-tool-install | |
just ci-install | |
just import-data | |
just ci-config | |
- name: Run unit tests | |
run: | | |
just ci-test |