diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 85c8188..0000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Serokell -# -# SPDX-License-Identifier: MPL-2.0 - -steps: - - label: check trailing whitespaces - command: nix build -L .#checks.x86_64-linux.trailing-whitespace - - - label: shellcheck - command: nix build -L .#checks.x86_64-linux.shellcheck - - - label: validate cabal files - command: nix develop .#ci -c ./scripts/validate-cabal-files.sh - - - label: stylish - command: nix build -L .#checks.x86_64-linux.stylish-haskell - soft_fail: - - exit_status: 1 - - - label: lint - command: nix build -L .#checks.x86_64-linux.hlint - - - label: build - key: build - command: nix build -L .#checks.x86_64-linux.build-all - - - label: tests - depends_on: build - commands: - - nix build -L .#checks.x86_64-linux.test - - nix develop .#doctest -c runghc doctest/doctests.hs - - - label: xrefcheck - command: nix run github:serokell/xrefcheck - - - label: REUSE lint - command: nix build -L .#checks.x86_64-linux.reuse-lint - - # wait for all checks to finish - - wait - - - label : deploy staging - command: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks - branches: staging diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7256940..0db3ef8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -51,3 +51,10 @@ you must be able to justify that. - [ ] My commits comply with [the policy used in Serokell](https://www.notion.so/serokell/Where-and-how-to-commit-your-work-58f8973a4b3142c8abbd2e6fd5b3a08e). - [ ] My code complies with the [style guide](../tree/master/docs/code-style.md). + +## ✓ Release Checklist + +- [ ] I updated the version number in `package.yaml`. +- [ ] (After merging) I created a new entry in the [releases](https://github.com/serokell/tzbot/releases) page, + with a summary of all user-facing changes. + * I made sure a tag was created using the format `vX.Y` diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..1aed6df --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: 2022 Serokell +# +# SPDX-License-Identifier: MPL-2.0 + +name: CI + +on: + push: + +jobs: + validate: + runs-on: [self-hosted, nix] + steps: + - uses: actions/checkout@v3 + + - name: check trailing whitespaces + run: nix build -L .#checks.x86_64-linux.trailing-whitespace + + - name: shellcheck + run: nix build -L .#checks.x86_64-linux.shellcheck + if: success() || failure() + + - name: validate cabal files + run: nix develop .#ci -c ./scripts/validate-cabal-files.sh + if: success() || failure() + + - name: stylish + run: nix build -L .#checks.x86_64-linux.stylish-haskell + if: success() || failure() + + - name: lint + run: nix build -L .#checks.x86_64-linux.hlint + if: success() || failure() + + # not working for unknown reason (OPS-1487) + # - name: xrefcheck + # run: nix run github:serokell/xrefcheck + # if: success() || failure() + + - name: REUSE lint + run: nix build -L .#checks.x86_64-linux.reuse-lint + if: success() || failure() + + build: + runs-on: [self-hosted, nix] + steps: + - uses: actions/checkout@v3 + + - name: build + run: nix build -L .#checks.x86_64-linux.build-all + + test: + runs-on: [self-hosted, nix] + needs: [build] + steps: + - uses: actions/checkout@v3 + + - name: test + run: nix build -L .#checks.x86_64-linux.test + + - name: doctest + run: nix develop .#doctest -c runghc doctest/doctests.hs + if: success() || failure() + + deploy: + runs-on: [self-hosted, nix] + needs: [test] + if: ${{ github.ref == 'refs/heads/staging' }} + steps: + - uses: actions/checkout@v3 + + - name: deploy staging + run: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks diff --git a/README.md b/README.md index ea205fc..2d78985 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,7 @@ `tzbot` is a Slack bot that detects messages with references to some point in time and converts them to your timezone. -When a user in the Europe/Riga timezone sends a message such as: - -> Hey, can we meet tomorrow at 6pm? - -Users will receive an -"ephemeral message" (a message visible only to that user): - -![](./docs/imgs/example1.png) +![A screenshot of the bot converting "tomorrow at 6pm"](./docs/imgs/example1.png) ## Features diff --git a/docs/imgs/example1.png b/docs/imgs/example1.png index 240dfdd..f2e097b 100644 Binary files a/docs/imgs/example1.png and b/docs/imgs/example1.png differ diff --git a/flake.lock b/flake.lock index 3952b05..8450be4 100644 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1674127017, - "narHash": "sha256-QO1xF7stu5ZMDLbHN30LFolMAwY6TVlzYvQoUs1RD68=", + "lastModified": 1686747123, + "narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=", "owner": "serokell", "repo": "deploy-rs", - "rev": "8c9ea9605eed20528bf60fae35a2b613b901fd77", + "rev": "724463b5a94daa810abfc64a4f87faef4e00f984", "type": "github" }, "original": { diff --git a/package.yaml b/package.yaml index ce07731..ab02e2e 100644 --- a/package.yaml +++ b/package.yaml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MPL-2.0 name: tzbot -version: 0.1.0.0 +version: 1.0 github: serokell/tzbot license: MPL-2.0 license-file: LICENSE diff --git a/tzbot.cabal b/tzbot.cabal index a2a18eb..e42445a 100644 --- a/tzbot.cabal +++ b/tzbot.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: tzbot -version: 0.1.0.0 +version: 1.0 description: Please see the README on GitHub at homepage: https://github.com/serokell/tzbot#readme bug-reports: https://github.com/serokell/tzbot/issues