Update map colours (#4387) #372
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: main checks | |
on: | |
push: | |
branches: | |
- main | |
env: | |
SECRET_KEY: insecure_test_key | |
jobs: | |
run-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build image | |
run: DOCKER_BUILDKIT=1 docker build --tag snapcraft-io . | |
- name: Run image | |
run: | | |
docker run -d -p 80:80 --env SECRET_KEY=insecure_secret_key snapcraft-io | |
sleep 1 && curl --head --fail --retry-delay 5 --retry 10 --retry-connrefused http://localhost | |
run-dotrun: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dotrun | |
run: | | |
sudo snap install dotrun | |
sudo chown root:root / | |
- name: Install dependencies | |
run: /snap/bin/dotrun install | |
- name: Build assets | |
run: /snap/bin/dotrun build | |
- name: Run dotrun | |
run: | | |
/snap/bin/dotrun & | |
curl --head --fail --retry-delay 1 --retry 30 --retry-connrefused http://localhost:8004 | |
lint-python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install node dependencies | |
run: yarn install --immutable | |
- name: Install python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
sudo pip3 install flake8 black | |
- name: Lint python | |
run: yarn lint-python | |
lint-scss: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Lint scss | |
run: yarn lint-scss | |
lint-js: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Lint js | |
run: yarn lint-js | |
test-python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install requirements | |
run: | | |
sudo apt-get update && sudo apt-get install --yes python3-setuptools | |
sudo pip3 install -r requirements.txt | |
- name: Install dotrun | |
run: | | |
sudo snap install dotrun | |
sudo chown root:root / | |
- name: Install dependencies | |
run: sudo pip3 install coverage | |
- name: Install node dependencies | |
run: /snap/bin/dotrun install | |
- name: Build resources | |
run: /snap/bin/dotrun build | |
- name: Run python tests with coverage | |
run: | | |
/snap/bin/dotrun exec coverage run --source=. -m unittest discover tests | |
bash <(curl -s https://codecov.io/bash) -cF python | |
test-js: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Run JS tests with coverage | |
run: | | |
yarn test-js | |
bash <(curl -s https://codecov.io/bash) -cF javascript |