CI #1920
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 12 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: pip install -r dev-requirements.txt | |
- name: Setup git user | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "actions@users.noreply.github.com" | |
- name: Test | |
run: coverage run -m pytest | |
- name: Lint | |
run: make lint | |
- name: Update(master) | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: coverage run -a ./scripts/update.py --release | |
- name: Update | |
if: ${{ !(github.ref == 'refs/heads/master' && github.event_name != 'pull_request') }} | |
run: coverage run -a ./scripts/update.py | |
# FIXME | |
#- name: Report coverage | |
# env: | |
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
# run: | | |
# coverage xml && coverage report | |
# if [[ -n "$CC_TEST_REPORTER_ID" ]]; then\ | |
# curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter &&\ | |
# chmod +x ./cc-test-reporter &&\ | |
# ./cc-test-reporter after-build ;\ | |
# fi |