Skip to content

Container slices tests #24

Container slices tests

Container slices tests #24

name: Container slices tests
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lang-container-tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04", "ubuntu-24.04-arm"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: setup paths
run: |
mkdir -p repotests rubyresults scalaresults
- uses: actions/checkout@v4
with:
repository: 'campsite/campsite'
path: 'repotests/campsite'
ref: '10197238bbbefd9c9ac7c77467b647fd93993ba0'
- uses: actions/checkout@v4
with:
repository: 'bionomia/bionomia'
path: 'repotests/bionomia'
ref: '5ada8b5f4a5f68561a7195e2badc2f744dc4676e'
- uses: actions/checkout@v4
with:
repository: 'OWASP/railsgoat'
path: 'repotests/railsgoat'
ref: 'c1e8ff1e3b24a1c48fcfc9fbee0f65dc296b49d9'
- uses: actions/checkout@v4
with:
repository: 'playframework/play-samples'
path: 'repotests/play-samples'
ref: '0dccba17856e89dbb5e457ab760efb14cc691395'
- name: generate usages - bionomia
run: |
mkdir -p $GITHUB_WORKSPACE/rubyresults/bionomia
cd repotests/bionomia
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/appthreat/atom:main atom --help
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/appthreat/atom:main rbastgen --help
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/appthreat/atom:main atom usages -l ruby -o /app/app.atom -s /app/usages.slices.json /app
ls -lh
cp *.slices.json $GITHUB_WORKSPACE/rubyresults/bionomia
- name: generate usages - railsgoat
run: |
mkdir -p $GITHUB_WORKSPACE/rubyresults/railsgoat
cd repotests/railsgoat
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/appthreat/atom:main atom usages --extract-endpoints -l ruby -o /app/app.atom -s /app/usages.slices.json /app
ls -lh
cp *.slices.json $GITHUB_WORKSPACE/rubyresults/railsgoat
- name: generate usages - campsite
run: |
mkdir -p $GITHUB_WORKSPACE/rubyresults/campsite
cd repotests/campsite/api
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/appthreat/atom:main atom usages -l ruby -o /app/app.atom -s /app/usages.slices.json /app
ls -lh
cp *.slices.json $GITHUB_WORKSPACE/rubyresults/campsite
- name: generate usages - play-samples
run: |
mkdir -p $GITHUB_WORKSPACE/scalaresults/play-samples
cd repotests/play-samples/play-scala-rest-api-example
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -w /app -t ghcr.io/appthreat/atom:main scala --version
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -w /app -t ghcr.io/appthreat/atom:main scalac --version
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -w /app -t ghcr.io/appthreat/atom:main scalasem /app /app/semantics.slices.json
ls -lh
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -w /app -t ghcr.io/appthreat/atom:main atom usages --extract-endpoints -l scala -o /app/app.atom -s /app/usages.slices.json /app
ls -lh
cp *.slices.json $GITHUB_WORKSPACE/scalaresults/play-samples
- uses: actions/upload-artifact@v4
with:
name: rubyresults
path: rubyresults
if: matrix.os == 'ubuntu-24.04'
- uses: actions/upload-artifact@v4
with:
name: scalaresults
path: scalaresults
if: matrix.os == 'ubuntu-24.04'
npm-latest-tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-latest"]
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '23.x'
registry-url: https://registry.npmjs.org/
- uses: coursier/cache-action@v6
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install atom latest
run: |
npm install -g @appthreat/atom
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.2'
bundler-cache: false
- name: Check rbastgen 3.4.2
run: |
rbastgen --help