# Lazy jobs running on master post merges.
name: Lazy
on:
  push:
    branches: [master]

jobs:
  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - run: sudo apt-get update -y -qq
      - run: sudo add-apt-repository ppa:ubuntu-x-swat/updates -y
      - run: sudo apt-get update
      - run: sudo apt install -y libxcb-xfixes0-dev mesa-vulkan-drivers
      - name: Generate report
        uses: actions-rs/tarpaulin@v0.1
        with:
          args: '-p wgpu-core -p wgpu-hal'
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
      - name: Archive code coverage results
        uses: actions/upload-artifact@v1
        with:
          name: code-coverage-report
          path: cobertura.xml
