Skip to content

Commit

Permalink
fix: set up git auth
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanelly95 committed Sep 29, 2023
1 parent fc8e923 commit dd9eeac
Showing 1 changed file with 83 additions and 86 deletions.
169 changes: 83 additions & 86 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,86 +22,86 @@ jobs:
with:
action: persist

test:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
- name: Run tests
run: |
CI=true npm run test
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: test
path: test
# test:
# runs-on: ubuntu-latest
# needs: install_dependencies
# steps:
# - uses: bissolli/gh-action-persist-workspace@v1
# with:
# action: retrieve
# - name: Run tests
# run: |
# CI=true npm run test
# - name: Store artifacts
# uses: actions/upload-artifact@v2
# with:
# name: test
# path: test

scenarios:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
- name: Run scenarios
run: |
CI=true npm run scenarios
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: scenarios
path: scenarios
# scenarios:
# runs-on: ubuntu-latest
# needs: install_dependencies
# steps:
# - uses: bissolli/gh-action-persist-workspace@v1
# with:
# action: retrieve
# - name: Run scenarios
# run: |
# CI=true npm run scenarios
# - name: Store artifacts
# uses: actions/upload-artifact@v2
# with:
# name: scenarios
# path: scenarios

lint:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
- name: Run Lint
run: npm run lint
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: lint
path: lint
# lint:
# runs-on: ubuntu-latest
# needs: install_dependencies
# steps:
# - uses: bissolli/gh-action-persist-workspace@v1
# with:
# action: retrieve
# - name: Run Lint
# run: npm run lint
# - name: Store artifacts
# uses: actions/upload-artifact@v2
# with:
# name: lint
# path: lint

coverage:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
- name: Run Coverage
run: npm run coverage
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage
# coverage:
# runs-on: ubuntu-latest
# needs: install_dependencies
# steps:
# - uses: bissolli/gh-action-persist-workspace@v1
# with:
# action: retrieve
# - name: Run Coverage
# run: npm run coverage
# - name: Upload coverage to Coveralls
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Store artifacts
# uses: actions/upload-artifact@v2
# with:
# name: coverage
# path: coverage

slither:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
node-version: 16
sarif: results.sarif
fail-on: high
# slither:
# runs-on: ubuntu-latest
# needs: install_dependencies
# steps:
# - uses: bissolli/gh-action-persist-workspace@v1
# with:
# action: retrieve
# - name: Run Slither
# uses: crytic/[email protected]
# id: slither
# with:
# node-version: 16
# sarif: results.sarif
# fail-on: high

gasCompare:
runs-on: ubuntu-latest
Expand All @@ -110,17 +110,14 @@ jobs:
- uses: bissolli/gh-action-persist-workspace@v1
with:
action: retrieve
# - name: Set up Git Authentication
# run: |
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# git config --global user.name "RazorBot"
# echo "https://$GITHUB_TOKEN_USERNAME:[email protected]" > ~/.git-credentials
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN_USERNAME: ${{ secrets.GITHUB_TOKEN_USERNAME }}
- name: Setup Git to use PAT
- name: Set up Git Authentication
run: |
git config --global url."https://${{ secrets.GITHUB_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
echo "https://$GITHUB_TOKEN_USERNAME:[email protected]" > ~/.git-credentials
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_USERNAME: ${{ secrets.GITHUB_TOKEN_USERNAME }}

- name: Run GasCompare
run: |
Expand Down

0 comments on commit dd9eeac

Please sign in to comment.