name: Build and Test on: push: branches: [ "main" ] pull_request: branches: [ "main" ] env: CARGO_TERM_COLOR: always jobs: rust: runs-on: ubuntu-latest environment: CI steps: - uses: actions/checkout@v3 - name: Clone spacebar server run: | git clone https://github.com/bitfl0wer/server.git - uses: actions/setup-node@v3 with: node-version: 18 cache: 'npm' cache-dependency-path: server/package-lock.json - name: Prepare and start Spacebar server run: | npm install npm run setup npm run start & working-directory: ./server - uses: Swatinem/rust-cache@v2 with: cache-all-crates: "true" - name: Build, Test and Publish Coverage run: | curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash cargo binstall --no-confirm cargo-tarpaulin --force cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120