Skip to content

[antlir][oss] use watchman (#235) #3511

[antlir][oss] use watchman (#235)

[antlir][oss] use watchman (#235) #3511

Workflow file for this run

name: Tests
on: [push, pull_request, workflow_call]
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: facebook/install-dotslash@latest
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: BTRFS-ify antlir2-out
run: |
mkdir antlir2-out
truncate -s 100G ${{ runner.temp }}/image.btrfs
mkfs.btrfs ${{ runner.temp }}/image.btrfs
sudo mount ${{ runner.temp }}/image.btrfs antlir2-out
- name: Install deps
run: |
sudo apt install \
cpio jq systemd-container
- name: Disable watchman
run: |
echo '[buck2]' >> .buckconfig
echo 'file_watcher=notify' >> .buckconfig
- name: Find tests
run: |
./buck2 uquery 'kind(".*_test", set(%s)) - attrfilter(labels, disabled, set(%s))' \
//antlir/antlir2/antlir2_facts/... \
//antlir/antlir2/features/clone/tests: \
//antlir/antlir2/features/install/tests: \
//antlir/antlir2/features/rpm/tests: \
//antlir/antlir2/features/tarball/tests: \
| tee ${{ runner.temp }}/tests.txt
- name: Build tests
run: |
./buck2 build @${{ runner.temp }}/tests.txt
- name: Run tests
run: |
./buck2 test @${{ runner.temp }}/tests.txt