JOJ3-config-generator/.gitea/workflows/build.yaml
张泊明518370910136 19f5c7193f
All checks were successful
build / build (push) Successful in 1m54s
ci(build): upload coverage on master only
2025-03-19 02:18:41 -04:00

41 lines
1.2 KiB
YAML

name: build
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@focs
- name: Display Python3 version
run: python3 --version
- name: Install PDM
run: |
echo curl
curl -sSL https://ghfast.top/https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py -o install-pdm.py
echo sed
sed -i 's|https://github.com|https://ghfast.top/https://github.com|g' install-pdm.py
echo python3
python3 install-pdm.py -p /usr
- name: Display PDM version
run: pdm --version
- name: PDM install dependencies
run: |
pdm install
- name: Lint
run: |
pdm run lint
- name: Test with Coverage
run: |
pdm run coverage
- name: Upload Coverage to Codacy
if: github.ref == 'refs/heads/master'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml
- name: Run
run: |
pdm run app --help