name: Verify

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  backend:
    runs-on: ubuntu-latest
    container: sfja/h5-mst-ci:latest
    steps:
    - uses: actions/checkout@v6
    - name: check
      working-directory: ./backend
      run: make check
    - name: build
      working-directory: ./backend
      run: make all
    - name: test
      working-directory: ./backend
      run: make test

  game:
    runs-on: ubuntu-latest
    container: sfja/h5-mst-ci:latest
    steps:
    - uses: actions/checkout@v6
    - run: rustup default stable
    - name: check
      working-directory: ./game
      run: cargo check
    - name: build
      working-directory: ./game
      run: cargo build
    - name: test
      working-directory: ./game
      run: cargo test

