diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml new file mode 100644 index 000000000..2c43d6afa --- /dev/null +++ b/.github/workflows/scala.yml @@ -0,0 +1,47 @@ +name: Exam + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + services: + postgres: + image: postgres + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v2 + with: + java-version: 1.21 + distribution: temurin + - uses: actions/checkout@v4 + - name: Set up Node 18 + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Create database user + run: psql -c "CREATE USER sitnet WITH PASSWORD 'sitnetsitnet';" -U postgres + - name: Create database + run: psql -c 'CREATE DATABASE sitnet_test WITH OWNER 'sitnet';' -U postgres + - name: Move to UI directory + run: cd ui + - name: Clean node_modules + run: rm -rf node_modules + - name: Install dependencies + run: npm i + - name: Check format + run: npm run check-format + - name: Lint + run: npm run check-lint + - name: Build production bundle + run: npm run build + - name: Move back to root + run: cd .. + - name: Run tests + run: sbt test + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 93a648ac7..000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -os: linux - -dist: xenial - -language: - - scala - -jdk: - - openjdk21 - -node_js: - - 18 - -services: - - postgresql - -addons: - postgresql: "9.6" - -before_script: - - psql -c "CREATE USER sitnet WITH PASSWORD 'sitnetsitnet';" -U postgres - - psql -c 'CREATE DATABASE sitnet_test WITH OWNER 'sitnet';' -U postgres - - sed -i 's/\/var\/log\/exam/logs/g' $TRAVIS_BUILD_DIR/conf/logback.xml - - rm -rf ui/node_modules - - cd ui - - npm install -script: - - npm run build - - npm run check-format - - npm run check-lint - - cd .. - - sbt test - -before_cache: - # Tricks to avoid unnecessary cache updates - - find $HOME/.sbt -name "*.lock" | xargs rm - - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm - -cache: - directories: - - $HOME/.cache/coursier - # $HOME/.ivy2/cache - - $HOME/.sbt