diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ae3034e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,78 @@ +name: "CI" +on: + push: + paths-ignore: + - "README.rst" + branches: + - "main" + pull_request: + branches: + - "*" + +jobs: + ci: + runs-on: "ubuntu-latest" + continue-on-error: "${{ matrix.experimental }}" + strategy: + fail-fast: false + matrix: + emacs-version: + - "26.1" + - "26.2" + - "26.3" + - "27.1" + - "27.2" + - "28.1" + - "28.2" + - "29.1" + experimental: [false] + include: + - emacs-version: "snapshot" + experimental: true + + steps: + - uses: "actions/checkout@v4" + + - name: "Build cache inputs" + id: "cache-inputs" + run: | + { + echo 'cache-path<> "$GITHUB_OUTPUT" + echo 'cache-key=cask-${{ hashFiles('Cask') }}' >> "$GITHUB_OUTPUT" + + - uses: "actions/cache@v3" + id: "emacs-cask-cache" + with: + path: "${{ steps.cache-inputs.outputs.cache-path }}" + key: "${{ steps.cache-inputs.outputs.cache-key }}" + + - uses: "purcell/setup-emacs@master" + with: + version: "${{ matrix.emacs-version }}" + + - if: ${{ steps.emacs-cask-cache.outputs.cache-hit != 'true' }} + uses: "cask/setup-cask@master" + with: + version: "0.9.0" + + - name: "Compile" + run: | + make compile + + - uses: "actions/setup-go@v4" + with: + go-version: "stable" + check-latest: true + cache: false + + - name: "Install tomljson" + run: | + go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest + + - name: "Test" + run: | + make test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 82d7db9..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,78 +0,0 @@ -on: - push: - paths-ignore: - - "README.rst" - branches: - - "main" - pull_request: - branches: - - "*" -jobs: - compile: - runs-on: "ubuntu-latest" - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - emacs-version: - - "26.1" - - "26.2" - - "26.3" - - "27.1" - - "27.2" - - "28.1" - - "28.2" - - "29.1" - experimental: [false] - include: - - emacs-version: snapshot - experimental: true - steps: - - uses: "actions/checkout@v3" - - uses: "purcell/setup-emacs@master" - with: - version: ${{ matrix.emacs-version }} - - uses: "cask/setup-cask@master" - with: - version: "0.9.0" - - run: | - make compile - - test: - runs-on: ubuntu-latest - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - emacs-version: - - "26.1" - - "26.2" - - "26.3" - - "27.1" - - "27.2" - - "28.1" - - "28.2" - - "29.1" - experimental: [false] - include: - - emacs-version: snapshot - experimental: true - steps: - - uses: "actions/checkout@v3" - - uses: "purcell/setup-emacs@master" - with: - version: ${{ matrix.emacs-version }} - - uses: "cask/setup-cask@master" - with: - version: "0.9.0" - - uses: "actions/setup-go@v4" - with: - go-version: "stable" - check-latest: true - cache: false - - name: "Install packages" - run: | - go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest - - name: "Run tests" - run: | - make test