diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 43c980d54cda..bd97f3a8e617 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,52 +1,8 @@ name: pr on: pull_request jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04, windows-2022, macos-12] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - uses: coursier/cache-action@v6 - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '19' - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - - name: Install Bundler - run: gem install bundler - - name: Delete `.rustup` directory - run: rm -rf /home/runner/.rustup # to save disk space - if: runner.os == 'Linux' - - name: Delete `.cargo` directory # to save disk space - run: rm -rf /home/runner/.cargo - if: runner.os == 'Linux' - - name: Compile and run tests - run: sbt clean +test - formatting: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '19' - - name: Check formatting - run: sbt scalafmtCheck Test/scalafmtCheck - - run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt Test/scalafmt'" - if: ${{ failure() }} test-scripts: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: @@ -54,15 +10,6 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - distribution: 'temurin' - java-version: '19' + distribution: 'oracle' + java-version: '17' - run: ./testDistro.sh - - run: | - mkdir /tmp/foo - echo "int foo(int a, int b, int c, int d, int e, int f) {}" > /tmp/foo/foo.c - ./joern --src /tmp/foo --run scan - ./joern-scan /tmp/foo - ./joern-scan --dump - - run: | - cd joern-cli/target/universal/stage - ./schema-extender/test.sh diff --git a/testDistro.sh b/testDistro.sh index c46079dbab10..0e3f26a9bd69 100755 --- a/testDistro.sh +++ b/testDistro.sh @@ -10,8 +10,6 @@ echo "staging joern" pushd $REPO_ROOT sbt -Dsbt.log.noformat=true clean joerncli/stage querydb/createDistribution tests/frontends-tests.sh - tests/scripts-test.sh - tests/querydb-test.sh popd echo "success. go analyse some code" diff --git a/tests/frontends-tests.sh b/tests/frontends-tests.sh index 7fe012d131f8..060ff03c3215 100755 --- a/tests/frontends-tests.sh +++ b/tests/frontends-tests.sh @@ -8,7 +8,7 @@ SCRIPT_ABS_DIR=$(dirname "$SCRIPT_ABS_PATH") JOERN="$SCRIPT_ABS_DIR"/../joern # first, run a simplistic smoke test -$JOERN --script tests/frontends-smoketest.sc +$JOERN --script tests/frontends-smoketest.sc --verbose # now test all frontends with proper input code frontends=(c jssrc javasrc java ghidra pythonsrc php)