Fix test check failing on pushing to master #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
# Build | |
- name: Build | |
run: mvn -B package | |
env: | |
REDIS_HOST: ${{ secrets.REDIS_HOST }} | |
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | |
REDIS_PORT: ${{ secrets.REDIS_PORT }} | |
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }} | |
TWILIO_API_TOKEN: ${{ secrets.TWILIO_API_TOKEN }} | |
TWILIO_SENDER_NUMBER: ${{ secrets.TWILIO_SENDER_NUMBER }} | |
TWILIO_VERIFIED_NUMBER: ${{ secrets.TWILIO_VERIFIED_NUMBER }} | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
# - name: Setup Testcontainers Cloud Client | |
# uses: atomicjar/testcontainers-cloud-setup-action@v1 | |
# with: | |
# token: ${{ secrets.TC_CLOUD_TOKEN }} | |
# Check Docker Service | |
- name: Check Docker version | |
run: docker --version | |
- name: Docker info | |
run: docker info | |
# Testcontainers | |
- name: Set up Testcontainers environment | |
run: | | |
sudo sysctl -w net.ipv4.ip_forward=1 | |
sudo mkdir -p /etc/docker | |
echo '{ "features": { "buildkit": false } }' | sudo tee /etc/docker/daemon.json | |
sudo service docker restart | |
# Test | |
- name: Test | |
run: mvn test | |
env: | |
REDIS_HOST: ${{ secrets.REDIS_HOST }} | |
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | |
REDIS_PORT: ${{ secrets.REDIS_PORT }} | |
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }} | |
TWILIO_API_TOKEN: ${{ secrets.TWILIO_API_TOKEN }} | |
TWILIO_SENDER_NUMBER: ${{ secrets.TWILIO_SENDER_NUMBER }} | |
TWILIO_VERIFIED_NUMBER: ${{ secrets.TWILIO_VERIFIED_NUMBER }} | |
Checkstyle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nikitasavinov/checkstyle-action@0.6.0 | |
with: | |
checkstyle_config: config/checkstyle/sun_checks_custom.xml |