diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml new file mode 100644 index 0000000..13550e3 --- /dev/null +++ b/.github/workflows/ci-linux.yml @@ -0,0 +1,48 @@ +name: Linux + +on: + push: + # branches: + # - main + paths-ignore: + - "README.md" + - "CODE_OF_CONDUCT.md" + - ".editorconfig" + - ".spi.yml" + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + container: + image: swift:6.2 + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Lint + run: swift format lint --recursive --configuration .swift-format --strict Sources Tests + + linux_test: + name: Test Linux + runs-on: ubuntu-latest + container: + image: swift:${{matrix.swift-version}} + timeout-minutes: 30 + strategy: + matrix: + swift-version: + - "6.2" + steps: + - name: Checkout + uses: actions/checkout@v6 + - run: swift --version + - name: Test + run: swift test diff --git a/README.md b/README.md index c1687f3..bdedfe1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Apple](https://github.com/germ-network/Microcosm/actions/workflows/ci-apple.yml/badge.svg)](https://github.com/germ-network/Microcosm/actions/workflows/ci-apple.yml) +[![Linux](https://github.com/germ-network/Microcosm/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/germ-network/Microcosm/actions/workflows/ci-linux.yml) [![Android](https://github.com/germ-network/Microcosm/actions/workflows/ci-android.yml/badge.svg)](https://github.com/germ-network/Microcosm/actions/workflows/ci-android.yml)