Skyler | 1024565 | 2022-08-08 21:43:50 +0100 | [diff] [blame] | 1 | name: Lint & Compile |
| 2 | |
| 3 | # Controls when the workflow will run |
| 4 | on: |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 5 | # Triggers the workflow on push or pull request events but only for the "development" branch |
| 6 | push: |
| 7 | branches: ["development"] |
| 8 | pull_request: |
| 9 | branches: ["development"] |
Skyler | 1024565 | 2022-08-08 21:43:50 +0100 | [diff] [blame] | 10 | |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 11 | # Allows you to run this workflow manually from the Actions tab |
| 12 | workflow_dispatch: |
Skyler | 1024565 | 2022-08-08 21:43:50 +0100 | [diff] [blame] | 13 | |
| 14 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 15 | jobs: |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 16 | lint: |
| 17 | runs-on: ubuntu-latest |
Skyler Grey | 28fadca | 2023-03-05 07:47:00 +0000 | [diff] [blame] | 18 | |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 19 | steps: |
| 20 | - uses: actions/checkout@v3 |
Skyler Grey | 83d8aeb | 2023-04-23 01:05:40 +0000 | [diff] [blame] | 21 | - uses: cachix/install-nix-action@v19 |
Skyler Grey | 28fadca | 2023-03-05 07:47:00 +0000 | [diff] [blame] | 22 | with: |
Skyler Grey | 83d8aeb | 2023-04-23 01:05:40 +0000 | [diff] [blame] | 23 | github_access_token: ${{ secrets.GITHUB_TOKEN }} |
| 24 | - run: nix develop --command yarn install --immutable --immutable-cache --check-cache |
Skyler Grey | 19f1b9c | 2023-03-08 15:13:02 +0000 | [diff] [blame] | 25 | - name: Show versions |
Skyler Grey | 83d8aeb | 2023-04-23 01:05:40 +0000 | [diff] [blame] | 26 | run: nix develop --command yarn run versions |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 27 | - name: Compile |
Skyler Grey | 83d8aeb | 2023-04-23 01:05:40 +0000 | [diff] [blame] | 28 | run: nix develop --command yarn build |
Skyler Grey | e797014 | 2023-03-05 10:07:59 +0000 | [diff] [blame] | 29 | - name: Run prettier and eslint |
Skyler Grey | 83d8aeb | 2023-04-23 01:05:40 +0000 | [diff] [blame] | 30 | run: nix develop --command yarn lint-ci |