Enable procedural macros by default #406
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: ${{ github.head_ref != 'main' }} | |
jobs: | |
checks: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
# Node is at 20.x version because of extest (20.x is tested with it) | |
# https://github.com/redhat-developer/vscode-extension-tester?tab=readme-ov-file#requirements | |
# NOTE: If we eventually upgrade to 22.x, chai library can be then upgraded as well | |
# (we don't really need the latest one though) | |
node-version: "20.x" | |
cache: npm | |
# https://github.com/redhat-developer/vscode-extension-tester/blob/eaf266f43e1dca66cb0d660ecbf8f59e56af4808/KNOWN_ISSUES.md?plain=1#L64 | |
# This applies to all other usages of this command in this file | |
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
- run: npm ci | |
- run: npm run lint-fmt | |
- run: npm run lint-eslint | |
test: | |
name: test | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: npm | |
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
- run: npm ci | |
- run: npm run compile-test | |
- run: npm test | |
ui-test-scarb: | |
name: check scarb from different sources | |
strategy: | |
matrix: | |
from-config: [true, false] | |
from-path: [true, false] | |
from-asdf-local: [true, false] | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: npm | |
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
# Scarb in PATH | |
- run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v "2.9.1" | |
echo "PATH_SCARB_VERSION=2.9.1" >> $GITHUB_ENV | |
if: ${{ matrix.from-path }} | |
# Scarb in config on ~/.local/bin/scarb | |
- run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -p -v "2.8.5" | |
echo "CONFIG_SCARB_VERSION=2.8.5" >> $GITHUB_ENV | |
if: ${{ matrix.from-config }} | |
# Scarb from asdf | |
- uses: asdf-vm/actions/setup@v3 | |
if: ${{ matrix.from-asdf-local }} | |
- run: | | |
asdf plugin add scarb | |
asdf install scarb "2.9.2" | |
asdf local scarb "2.9.2" | |
echo "ASDF_SCARB_VERSION=2.9.2" >> $GITHUB_ENV | |
if: ${{ matrix.from-asdf-local }} | |
- run: npm ci | |
- run: npm run compile-test | |
- run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run ui-test-scarb | |
test-ui-parametrized: | |
name: test ui | |
strategy: | |
matrix: | |
scarb: [disabled, "2.7.1", "2.8.5", "2.9.1"] | |
os: [ubuntu-24.04, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: npm | |
- uses: software-mansion/setup-scarb@v1 | |
if: ${{ matrix.scarb != 'disabled' }} | |
with: | |
scarb-version: ${{ matrix.scarb }} | |
- run: npm ci | |
- run: npm run compile-test | |
- run: | | |
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run ui-test | |
if: ${{ matrix.os == 'ubuntu-24.04'}} | |
- run: npm run ui-test | |
if: ${{ matrix.os != 'ubuntu-24.04'}} | |
test-ui: | |
if: ${{ always() }} | |
needs: | |
- test-ui-parametrized | |
- ui-test-scarb | |
runs-on: ubuntu-24.04 | |
steps: | |
- if: needs.test-ui-parametrized.result == 'success' && needs.ui-test-scarb.result == 'success' | |
run: exit 0 | |
- if: needs.test-ui-parametrized.result != 'success' || needs.ui-test-scarb.result != 'success' | |
run: exit 1 |