Skip to content

Commit 5cc3dcb

Browse files
Fix lint problems of workflows so that we can remove .prettierignore in the future (#7941)
* remove prettierignore * add back the ignore file
1 parent 5e70349 commit 5cc3dcb

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

.github/workflows/build_and_release.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ on:
55
tags:
66
- "*"
77
jobs:
8-
extract-tag:
9-
runs-on: ubuntu-latest
10-
outputs:
11-
version: ${{ steps.extract_tag.outputs.tag }}
12-
steps:
8+
extract-tag:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
version: ${{ steps.extract_tag.outputs.tag }}
12+
steps:
1313
- uses: actions/checkout@v4
14-
- id: extract_tag
15-
name: Extract tag name
16-
run: echo "::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)"
14+
- id: extract_tag
15+
name: Extract tag name
16+
run: echo "::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)"
1717

1818
build-and-publish-test-pypi:
1919
needs: extract-tag
2020
runs-on: ubuntu-latest
21-
environment:
21+
environment:
2222
name: pypi
2323
permissions:
24-
id-token: write # IMPORTANT: mandatory for trusted publishing
24+
id-token: write # IMPORTANT: mandatory for trusted publishing
2525
contents: write
2626
steps:
2727
- uses: actions/checkout@v4
@@ -31,19 +31,19 @@ jobs:
3131
python-version: "3.9"
3232
- name: Install dependencies
3333
run: python3 -m pip install --upgrade setuptools wheel twine build semver packaging
34-
- name: Get correct version for TestPyPI release
35-
id: check_version
36-
run: |
34+
- name: Get correct version for TestPyPI release
35+
id: check_version
36+
run: |
3737
VERSION=${{ needs.extract-tag.outputs.version }}
3838
PACKAGE_NAME="dspy-ai-test"
3939
echo "Checking if $VERSION for $PACKAGE_NAME exists on TestPyPI"
4040
NEW_VERSION=$(python3 .github/workflows/build_utils/test_version.py $PACKAGE_NAME $VERSION)
4141
echo "Version to be used for TestPyPI release: $NEW_VERSION"
42-
echo "::set-output name=version::$NEW_VERSION"
42+
echo "::set-output name=version::$NEW_VERSION"
4343
- name: Update version in pyproject.toml
44-
run: sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ steps.check_version.outputs.version }}"/;}' pyproject.toml
44+
run: sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ steps.check_version.outputs.version }}"/;}' pyproject.toml
4545
- name: Update package name in pyproject.toml
46-
run: sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai-test"/;}' pyproject.toml
46+
run: sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai-test"/;}' pyproject.toml
4747
- name: Build a binary wheel
4848
run: python3 -m build
4949
# Test the locally built wheel
@@ -59,7 +59,7 @@ jobs:
5959
# Publish to test-PyPI
6060
- name: Publish distribution 📦 to test-PyPI
6161
uses: pypa/gh-action-pypi-publish@release/v1 # This requires a trusted publisher to be setup in pypi/testpypi
62-
with:
62+
with:
6363
repository-url: https://test.pypi.org/legacy/
6464

6565
# TODO: Add tests using dspy-ai-test
@@ -69,10 +69,10 @@ jobs:
6969
# Only publish to PyPI if the repository owner is stanfordnlp
7070
if: github.repository_owner == 'stanfordnlp'
7171
runs-on: ubuntu-latest
72-
environment:
72+
environment:
7373
name: pypi
7474
permissions:
75-
id-token: write # IMPORTANT: mandatory for trusted publishing
75+
id-token: write # IMPORTANT: mandatory for trusted publishing
7676
contents: write
7777
steps:
7878
- uses: actions/checkout@v4
@@ -106,39 +106,39 @@ jobs:
106106
rm -r test_before_pypi
107107
- name: Publish distribution 📦 to PyPI (dspy)
108108
uses: pypa/gh-action-pypi-publish@release/v1
109-
with:
109+
with:
110110
attestations: false
111111
# Publish to dspy-ai
112112
- name: Update package name in pyproject.toml
113113
run: sed -i '/#replace_package_name_marker/{n;s/name *= *"[^"]*"/name="dspy-ai"/;}' ./dspy/.internal_dspyai/pyproject.toml
114114
- name: Update version for dspy-ai release
115115
run: sed -i '/#replace_package_version_marker/{n;s/version *= *"[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/.internal_dspyai/pyproject.toml
116-
- name: Update dspy dependency for dspy-ai release
116+
- name: Update dspy dependency for dspy-ai release
117117
run: |
118118
sed -i '/#replace_dspy_version_marker/{n;s/dspy *>= *"[^"]*/dspy>=${{ needs.extract-tag.outputs.version }}/;}' ./dspy/.internal_dspyai/pyproject.toml
119119
- name: Build a binary wheel (dspy-ai)
120120
run: python3 -m build ./dspy/.internal_dspyai/
121121
- name: Publish distribution 📦 to PyPI (dspy-ai)
122122
uses: pypa/gh-action-pypi-publish@release/v1
123-
with:
123+
with:
124124
attestations: false
125125
packages-dir: ./dspy/.internal_dspyai/dist/
126126
- uses: stefanzweifel/git-auto-commit-action@v5 # auto commit changes to main
127127
with:
128128
commit_message: Update versions
129129
create_branch: true
130130
branch: release-${{ needs.extract-tag.outputs.version }}
131-
- name: Checkout main branch
132-
run: |
133-
git fetch origin
134-
git checkout main
131+
- name: Checkout main branch
132+
run: |
133+
git fetch origin
134+
git checkout main
135135
- name: Configure git user
136-
run: |
136+
run: |
137137
git config --global user.email "[email protected]"
138138
git config --global user.name "Github Actions"
139-
- name: Merge release branch into main
140-
run: |
141-
git merge --no-ff release-${{ needs.extract-tag.outputs.version }}
139+
- name: Merge release branch into main
140+
run: |
141+
git merge --no-ff release-${{ needs.extract-tag.outputs.version }}
142142
- name: Push changes to main
143-
run: |
144-
git push origin main
143+
run: |
144+
git push origin main

.github/workflows/docs-push.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'docs/**'
8+
- "docs/**"
99
pull_request:
1010
paths:
11-
- 'docs/**'
11+
- "docs/**"
1212

1313
jobs:
1414
build-test:
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Node.js
2121
uses: actions/setup-node@v3
2222
with:
23-
node-version: '18'
23+
node-version: "18"
2424
- name: Install dependencies and build
2525
run: |
2626
cd docs
@@ -39,8 +39,8 @@ jobs:
3939
env:
4040
API_TOKEN_GITHUB: ${{ secrets.GH_PAT }}
4141
with:
42-
source-directory: 'docs'
43-
destination-github-username: 'krypticmouse'
44-
destination-repository-name: 'dspy-docs'
42+
source-directory: "docs"
43+
destination-github-username: "krypticmouse"
44+
destination-repository-name: "dspy-docs"
4545
user-email: [email protected]
46-
target-branch: master
46+
target-branch: master

0 commit comments

Comments
 (0)