Skip to content

Commit

Permalink
build(ci): disable slither for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Feb 8, 2024
1 parent c14cd69 commit d426883
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 69 deletions.
136 changes: 68 additions & 68 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
name: Code Analysis

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
slither:
name: Solidity code analysis
runs-on: ubuntu-latest

permissions:
contents: read
security-events: write

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

# REVIEW: here and below steps taken from official guide
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
- name: Install poetry
run: >
pipx install poetry
# REVIEW:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-adding-a-system-path
- name: Add poetry to $GITHUB_PATH
run: >
echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'

- name: Install dependencies
run: poetry install --no-root

- name: Run slither
run: >
poetry run slither . --sarif results.sarif --no-fail-pedantic
- name: Check results.sarif presence
id: results
if: always()
shell: bash
run: >
test -f results.sarif &&
echo 'value=present' >> $GITHUB_OUTPUT ||
echo 'value=not' >> $GITHUB_OUTPUT
- name: Upload results.sarif file
uses: github/codeql-action/upload-sarif@main
if: ${{ always() && steps.results.outputs.value == 'present' }}
with:
sarif_file: results.sarif
#on:
# push:
# branches: [master, develop]
# pull_request:
# branches: [master, develop]
#
#jobs:
# slither:
# name: Solidity code analysis
# runs-on: ubuntu-latest
#
# permissions:
# contents: read
# security-events: write
#
# steps:
# - uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - run: corepack enable
#
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'pnpm'
#
# - name: Install dependencies
# run: pnpm install
#
# # REVIEW: here and below steps taken from official guide
# # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
# - name: Install poetry
# run: >
# pipx install poetry
#
# # REVIEW:
# # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-adding-a-system-path
# - name: Add poetry to $GITHUB_PATH
# run: >
# echo "$HOME/.local/bin" >> $GITHUB_PATH
#
# - uses: actions/setup-python@v5
# with:
# python-version: '3.12'
# cache: 'poetry'
#
# - name: Install dependencies
# run: poetry install --no-root
#
# - name: Run slither
# run: >
# poetry run slither . --sarif results.sarif --no-fail-pedantic
#
# - name: Check results.sarif presence
# id: results
# if: always()
# shell: bash
# run: >
# test -f results.sarif &&
# echo 'value=present' >> $GITHUB_OUTPUT ||
# echo 'value=not' >> $GITHUB_OUTPUT
#
# - name: Upload results.sarif file
# uses: github/codeql-action/upload-sarif@main
# if: ${{ always() && steps.results.outputs.value == 'present' }}
# with:
# sarif_file: results.sarif
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Tests

on: [push, pull_request]
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
test:
Expand Down

0 comments on commit d426883

Please sign in to comment.