name: Test and build

on:
  push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.4
      - name: Start rocket.chat server
        uses: isbang/compose-action@v0.1.1
        with:
          compose-file: docker-compose-test-server.yml
      - name: Set up Python 3.8
        uses: actions/setup-python@v2
        with:
          python-version: 3.8
      - name: Install dependencies
        run: pip install codecov pytest-cov black
      - name: Wait for rocket.chat server to be online
        run: until curl http://localhost:3000/api/v1/info; do sleep 5; echo "waiting for Rocket.Chat server to start"; done
      - name: Lint with black
        run: black --check .
      - name: Run tests
        run: pytest tests rocketchat_API -x --cov=./
      - name: Upload code coverage
        run: codecov
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: Test and build

on:
  push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.4
      - name: Start rocket.chat server
        uses: isbang/compose-action@v0.1.1
        with:
          compose-file: docker-compose-test-server.yml
      - name: Set up Python 3.8
        uses: actions/setup-python@v2
        with:
          python-version: 3.8
      - name: Install dependencies
        run: pip install codecov pytest-cov black
      - name: Lint with black
        run: black --check .
      - name: Wait for rocket.chat server to be online
        run: until curl http://localhost:3000/api/v1/info; do sleep 5; echo "waiting for Rocket.Chat server to start"; done
      - name: Run tests
        run: pytest tests rocketchat_API -x --cov=./
      - name: Upload code coverage
        run: codecov
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Move linting before waiting for server
Move linting before waiting for server
