⬆️(deps): Bump actions/checkout from 4 to 6 #13
Workflow file for this run
This file contains hidden or 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: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.12'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Test import | |
| run: | | |
| python -c "from config import get_config; print('配置测试通过')" | |
| python -c "from yuque import get_file_extension; print('导入测试通过')" | |
| python main.py --help | |
| docker-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| docker build -t yuque-sync-test:latest . | |
| - name: Test Docker image | |
| run: | | |
| docker run --rm yuque-sync-test:latest python --version | |
| docker run --rm yuque-sync-test:latest python -c "from config import get_config; print('Docker配置测试通过')" |