Skip to content

Commit

Permalink
Merge pull request #42 from PelionIoT/use-git-config-action
Browse files Browse the repository at this point in the history
Use git-config action from CI repo, cleanup .gitconfig
  • Loading branch information
JanneKiiskila authored Apr 4, 2024
2 parents 5e03fad + 328c5dc commit 0b155ab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/MCCE-Test-Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Set access token
Expand All @@ -39,14 +39,14 @@ jobs:
pip install mbed-cli
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out scripts-internal repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: PelionIoT/scripts-internal
token: ${{ secrets.ACCESS_TOKEN }}
path: ${{ env.SCRIPTS_INTERNAL_DIR }}
ref: 'master'
- name: Check out MCCE repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: PelionIoT/mbed-cloud-client-example-internal
token: ${{ secrets.ACCESS_TOKEN }}
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ concurrency:

jobs:
run-pysh-check:
runs-on: ubuntu-22.04
runs-on: client
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install black pycodestyle pydocstyle shellcheck python3
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y black pycodestyle pydocstyle shellcheck python3
- run: black --version
# We cannot use the one in the continuous-integration-repo,
# because public repos cannot use actions in private repos.
- name: Set access token
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "[email protected]:"
Expand All @@ -22,35 +24,38 @@ jobs:
# Lets not run pysh-check on itself (it already has PR job for it)
- run: echo . >scripts-internal/.nopyshcheck
- run: scripts-internal/pysh-check/pysh-check.sh --workdir .
- name: Cleanup .gitconfig
if: always()
run: rm -f ~/.gitconfig

install-on-ubuntu-22-04:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set access token
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "[email protected]:"
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf "https://github"
- uses: actions/checkout@v4
- name: Install e2e-python-test-library
run: |
pip install wheel
python3 setup.py bdist_wheel
cd dist/
pip install -I client_test_lib*.whl
- name: Cleanup .gitconfig
if: always()
run: rm -f ~/.gitconfig

install-on-ubuntu-20-04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set access token
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "[email protected]:"
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf "https://github"
- uses: actions/checkout@v4
- name: Install e2e-python-test-library
run: |
pip install wheel
python3 setup.py bdist_wheel
cd dist/
pip install -I client_test_lib*.whl
- name: Cleanup .gitconfig
if: always()
run: rm -f ~/.gitconfig

call-mcce-linux:
# Note - primary/master version of this test is in the mcce-repo.
uses: ./.github/workflows/MCCE-Test-Linux.yml
Expand Down

0 comments on commit 0b155ab

Please sign in to comment.