-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from mcmod-info-mirror/ci-test
- Loading branch information
Showing
18 changed files
with
2,120 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 redis-tool-install | ||
just ci-install | ||
just import-data | ||
just ci-config | ||
- name: Run unit tests | ||
run: | | ||
just ci-test |
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
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
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
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
Oops, something went wrong.