name: Test Web application authentication developer setup

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '42 22 * * 0'

jobs:
  test-docker-compose:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      - run: |
          set -e
          sudo apt update
          sudo apt remove -y moby-engine moby-containerd moby-runc
          sudo apt install -y docker.io
          echo -e "dockremap:$( id -u ):1\ndockremap:200001:65535" | sudo tee -a /etc/subuid
          echo -e "dockremap:$( id -g ):1\ndockremap:200001:65535" | sudo tee -a /etc/subgid
          echo '{ "userns-remap": "default" }' | sudo tee /etc/docker/daemon.json
          sudo systemctl restart docker
      - run: docker-compose version
      - run: make build
      - run: make build COMPOSE=docker-compose.yml.www-with-app
      - run: make run
      - run: make test
      - run: docker-compose down
      - run: make run
      - run: make test
      - run: docker-compose down
      - run: make run COMPOSE=docker-compose.yml.www-with-app
      - run: make test

name: Test Web application authentication developer setup

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '42 22 * * 0'

jobs:
  test-docker-compose:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
      - run: |
          set -e
          sudo apt update
          sudo apt remove -y moby-engine moby-containerd moby-runc
          sudo apt install -y docker.io
          echo -e "dockremap:$( id -u ):1\ndockremap:200001:65535" | sudo tee -a /etc/subuid
          echo -e "dockremap:$( id -g ):1\ndockremap:200001:65535" | sudo tee -a /etc/subgid
          echo '{ "userns-remap": "default" }' | sudo tee /etc/docker/daemon.json
          sudo systemctl restart docker
      - run: docker-compose version
      - run: make build
      - run: make build COMPOSE=docker-compose.yml.www-with-app
      - run: make run
      - run: make test
      - run: docker-compose down
      - run: make run
      - run: make test
      - run: docker-compose down
      - run: make run COMPOSE=docker-compose.yml.www-with-app
      - run: make test

Address Node.js 12 actions are deprecated.
Address Node.js 12 actions are deprecated.

Message on workflows continued with
For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Please update the following actions to use Node.js 16: actions/checkout@v2
