fix action issues
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Successful in 20s
Rename the project from template / rename-project (push) Failing after 1s
CI / tests_linux (ubuntu-latest, 3.9) (push) Successful in 25s

This commit is contained in:
Simon Diesenreiter 2024-11-09 09:12:20 -08:00
parent 62e1917a95
commit cfb9e35095
2 changed files with 55 additions and 58 deletions

View File

@ -49,40 +49,40 @@ jobs:
- name: Run tests - name: Run tests
run: make test run: make test
tests_mac: # tests_mac:
needs: linter # needs: linter
strategy: # strategy:
fail-fast: false # fail-fast: false
matrix: # matrix:
python-version: [3.9] # python-version: [3.9]
os: [macos-latest] # os: [macos-latest]
runs-on: ${{ matrix.os }} # runs-on: ${{ matrix.os }}
steps: # steps:
- uses: actions/checkout@v3 # - uses: actions/checkout@v3
- uses: actions/setup-python@v4 # - uses: actions/setup-python@v4
with: # with:
python-version: ${{ matrix.python-version }} # python-version: ${{ matrix.python-version }}
- name: Install project # - name: Install project
run: make install # run: make install
- name: Run tests # - name: Run tests
run: make test # run: make test
tests_win: # tests_win:
needs: linter # needs: linter
strategy: # strategy:
fail-fast: false # fail-fast: false
matrix: # matrix:
python-version: [3.9] # python-version: [3.9]
os: [windows-latest] # os: [windows-latest]
runs-on: ${{ matrix.os }} # runs-on: ${{ matrix.os }}
steps: # steps:
- uses: actions/checkout@v3 # - uses: actions/checkout@v3
- uses: actions/setup-python@v4 # - uses: actions/setup-python@v4
with: # with:
python-version: ${{ matrix.python-version }} # python-version: ${{ matrix.python-version }}
- name: Install Pip # - name: Install Pip
run: pip install --user --upgrade pip # run: pip install --user --upgrade pip
- name: Install project # - name: Install project
run: pip install -e .[test] # run: pip install -e .[test]
- name: run tests # - name: run tests
run: pytest -s -vvvv -l --tb=long tests # run: pytest -s -vvvv -l --tb=long tests

View File

@ -6,7 +6,7 @@ permissions: write-all
jobs: jobs:
rename-project: rename-project:
if: ${{ !contains (gitea.repository, '/Pythonx') }} if: ${{ !equals (GITHUB_REPOSITORY, 'Templates/Python') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -16,30 +16,27 @@ jobs:
fetch-depth: 0 fetch-depth: 0
ref: ${{ gitea.head_ref }} ref: ${{ gitea.head_ref }}
- run: env - run: echo "REPOSITORY_NAME=$(echo '${{ GITHUB_REPOSITORY }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
shell: bash shell: bash
# - run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
# shell: bash
# - run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV - run: echo "REPOSITORY_URLNAME=$(echo '${{ GITHUB_REPOSITORY }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
# shell: bash shell: bash
# - run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV - run: echo "REPOSITORY_OWNER=$(echo '${{ GITHUB_REPOSITORY }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
# shell: bash shell: bash
# - name: Is this still a template - name: Is this still a template
# id: is_template id: is_template
# run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)" run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)"
# - name: Rename the project - name: Rename the project
# if: steps.is_template.outputs.is_template == 'true' if: steps.is_template.outputs.is_template == 'true'
# run: | run: |
# echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}" echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}"
# .gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}" .gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
# - uses: stefanzweifel/git-auto-commit-action@v4 - uses: stefanzweifel/git-auto-commit-action@v4
# with: with:
# commit_message: "✅ Ready to clone and code." commit_message: "✅ Ready to clone and code."
# # commit_options: '--amend --no-edit' # commit_options: '--amend --no-edit'
# push_options: --force push_options: --force