-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from PelionIoT/clean-up-gitconfig
Remove .gitconfig, upgrade actions
- Loading branch information
Showing
1 changed file
with
18 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,37 +19,43 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up golang | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.golang-ver }} | ||
- name: Golang version | ||
run: go version | ||
- name: Set GitHub access token via git config | ||
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" | ||
- name: Set access token for internal repo access | ||
uses: PelionIoT/actions/.github/actions/git-config@main | ||
with: | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
- run: sudo apt install golint | ||
- run: git clone [email protected]:PelionIoT/scripts-internal.git | ||
- name: Build all | ||
run: scripts-internal/golang/go_build_script.sh --all | ||
- name: Run make.sh test (go vet + go test) | ||
run: ./make.sh test | ||
- name: Cleanup .gitconfig | ||
if: always() | ||
run: rm -f ~/.gitconfig | ||
|
||
pysh-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set GitHub access token via git config | ||
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" | ||
- name: Set access token for internal repo access | ||
uses: PelionIoT/actions/.github/actions/git-config@main | ||
with: | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- run: git clone [email protected]:PelionIoT/scripts-internal.git | ||
- name: Run pysh-check | ||
run: | | ||
sudo apt install pycodestyle pydocstyle black | ||
echo "." >scripts-internal/.nopyshcheck | ||
echo "." >vendor/.nopyshcheck | ||
scripts-internal/pysh-check/pysh-check.sh --workdir . | ||
scripts-internal/pysh-check/pysh-check.sh --workdir . | ||
- name: Cleanup .gitconfig | ||
if: always() | ||
run: rm -f ~/.gitconfig |