Merge pull request #591 from beanbeanjuice/423-new-interaction-commands #158
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
name: "CodeQL and Maven CI" | |
on: | |
push: | |
branches: | |
- master | |
- integration | |
pull_request: | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'java' ] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | |
# Learn more about CodeQL language support at https://git.io/codeql-language-support | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize Sample AI JSON File | |
run: echo "{"test":{"triggers":["test"],"responses":["What are you testing, {user}?","Everything is good, boss!","Everything is working on my end, {user}!"]}}" | cat > ai.json | |
- name: Initialize Sample Menu JSON File | |
run: echo "{"breakfast":[{"name":"Normal Pancakes","price":7.25,"description":"Normal pancakes with a side of 2 eggs and 2 pieces of bacon!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/breakfasts/pancakes.jpg"}],"drink":[{"name":"Tea","price":3,"description":"A warm cup of tea for your cozy day!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/drinks/tea.webp"}],"sandwich":[{"name":"Ham Sandwich","price":4.25,"description":"A ham sandwich with cheese!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sandwiches/ham_sandwich.jpg"}],"soup":[{"name":"Chicken Noodle Soup","price":3.25,"description":"Chicken noodle soup to get you over a cold!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/soups/chicken_noodle_soup.jpg"}],"side":[{"name":"Fries","price":0.5,"description":"Some fries to go along with your order!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sides/fries.jpg"}],"fruit":[{"name":"Banana","price":0.25,"description":"A small banana for your potassium!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/fruits/banana.jpg"}],"sweet":[{"name":"Scone","price":2,"description":"A soft scone. Possible pair with a coffee!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sweets/scone.jpg"}],"alcohol":[{"name":"Not Rum and Coke","price":7,"description":"Something not too light but not too heavy!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/alcohol/rum_and_coke.jpg"}],"secret":[{"name":"The \"One Tap\"","price":10,"description":"A 69oz cup of Swedish fish GFUEL.","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/secrets/the_one_tap.webp"}]}" | cat > menu.json | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# queries: ./path/to/local/query, your-org/your-repo/queries@main | |
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | |
# If this step fails, then you should remove it and run the build manually (see below) | |
# - name: Autobuild | |
# uses: github/codeql-action/autobuild@v1 | |
# ℹ️ Command-line programs to run using the OS shell. | |
# 📚 https://git.io/JvXDl | |
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | |
# and modify them (or add more) to build your code if your project | |
# uses a compiled language | |
- name: Set up JDK 16 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '16' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build and Test with Maven | |
env: | |
CAFEBOT_VERSION: ${{ secrets.CAFEBOT_VERSION }} | |
CAFEBOT_TOKEN: ${{ secrets.CAFEBOT_TOKEN }} | |
CAFEBOT_GUILD_ID: ${{ secrets.CAFEBOT_GUILD_ID }} | |
CAFEBOT_GUILD_LOG_CHANNEL_ID: ${{ secrets.CAFEBOT_GUILD_LOG_CHANNEL_ID }} | |
CAFEBOT_GUILD_WEBHOOK_URL: ${{ secrets.CAFEBOT_GUILD_WEBHOOK_URL }} | |
CAFEBOT_TWITCH_ACCESS_TOKEN: ${{ secrets.CAFEBOT_TWITCH_ACCESS_TOKEN }} | |
KAWAII_API_TOKEN: ${{ secrets.KAWAII_API_TOKEN }} | |
API_PASSWORD: ${{ secrets.API_PASSWORD }} | |
CAFEBOT_REQUEST_LOCATION: ${{ secrets.CAFEBOT_REQUEST_LOCATION }} | |
run: mvn test | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |