Fix CI workflow - use native Gitea syntax
This commit is contained in:
@@ -2,28 +2,29 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [ main ]
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [ main ]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
mkdir -p ${{ github.workspace }}
|
||||||
|
cd ${{ github.workspace }}
|
||||||
|
git clone --depth 1 https://github.com/actions/checkout.git _actions/checkout
|
||||||
|
cp -r _actions/checkout/* .
|
||||||
|
rm -rf _actions
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
run: |
|
||||||
with:
|
python3 -m pip install --upgrade pip
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
pip install pytest
|
||||||
pip install pytest pytest-cov
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
@@ -33,13 +34,13 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
mkdir -p ${{ github.workspace }}
|
||||||
- name: Set up Python
|
cd ${{ github.workspace }}
|
||||||
uses: actions/setup-python@v5
|
git clone --depth 1 https://github.com/actions/checkout.git _actions/checkout
|
||||||
with:
|
cp -r _actions/checkout/* .
|
||||||
python-version: '3.10'
|
rm -rf _actions
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: |
|
run: |
|
||||||
@@ -50,15 +51,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
mkdir -p ${{ github.workspace }}
|
||||||
|
cd ${{ github.workspace }}
|
||||||
|
git clone --depth 1 https://github.com/actions/checkout.git _actions/checkout
|
||||||
|
cp -r _actions/checkout/* .
|
||||||
|
rm -rf _actions
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Verify build
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install and build
|
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
python -c "from man_card import cli, man_parser, card_generator, templates, config; print('All modules import successfully')"
|
python -c "from man_card import cli, man_parser, card_generator, templates, config; print('All modules import successfully')"
|
||||||
|
|||||||
Reference in New Issue
Block a user